LoggerRepository?
"Denis, Rich" <[email protected]> Wed, 25 Feb 2004 11:01:28 -0600
| Newsgroups | gmane.comp.windows.dotnet.log4net.user |
|---|---|
| Message-ID | <0E5E8D21FD875F449DF3B1BAC0376A6C77FE8F@pscdalpexch02.perotsystems.net> |
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C3FBC1.02D95A8A Content-Type: text/plain I have been using log4net for some time now on all my personal projects and recently have been tasked with giving a presentation on the log4net framework. I may asking a few of these over the next week but the first one that I have is on the loggerRepository. I am not too sure exactly what it is. Is it just a collection for the loggers? After reading the repository section, I see that it is an advanced feature, but I am puzzled by the following section : "This can be very useful to component developers that wish to use log4net for their components but do not want to require that all the applications that use their component are aware of log4net. It also means that their debugging configuration is separated from the applications configuration. The assembly should specify the RepositoryAttribute to set its logging repository." The embolden part is what I am most confused about. How would it be that applications that use my components not be aware of log4net. They would still need to have log4net in their bin folder if the assembly is not installed in the GAC right? Also, I was wondering if anyone out there has found a way to implement log4net without having to declare a static logger in each class. Kind of like just having a static class that you could call from any class and maybe pass in the name of the logger each time you used it. I am trying to conceptualize a way to use log4net without having to have developers know what it takes to implement it on each page. Any help you can provide in these two areas would be beneficial. Thanks in advance. Rich Denis perotsystems(tm) Office: T1211 <mailto:[email protected]> [email protected] ------_=_NextPart_001_01C3FBC1.02D95A8A Content-Type: text/html Content-Transfer-Encoding: quoted-printable <html xmlns:o=3D"urn:schemas-microsoft-com:office:office" = xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns=3D"http://www.w3.org/TR/REC-html40"> <head> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Dus-ascii"> <meta name=3DGenerator content=3D"Microsoft Word 11 (filtered medium)"> <style> <!-- /* Font Definitions */ @font-face {font-family:"Franklin Gothic Book"; panose-1:2 11 5 3 2 1 2 2 2 4;} @font-face {font-family:"Trebuchet MS"; panose-1:2 11 6 3 2 2 2 2 2 4;} @font-face {font-family:"Franklin Gothic Medium"; panose-1:2 11 6 3 2 1 2 2 2 4;} @font-face {font-family:Tahoma; panose-1:2 11 6 4 3 5 4 4 2 4;} @font-face {font-family:Verdana; panose-1:2 11 6 4 3 5 4 4 2 4;} /* Style Definitions */ p.MsoNormal, li.MsoNormal, div.MsoNormal {margin:0in; margin-bottom:.0001pt; font-size:11.0pt; font-family:"Franklin Gothic Book";} h1 {margin:0in; margin-bottom:.0001pt; page-break-after:avoid; font-size:16.0pt; font-family:Arial;} h2 {margin-top:12.0pt; margin-right:0in; margin-bottom:3.0pt; margin-left:0in; page-break-after:avoid; font-size:14.0pt; font-family:"Franklin Gothic Book"; font-style:italic;} h3 {margin-top:12.0pt; margin-right:0in; margin-bottom:3.0pt; margin-left:0in; page-break-after:avoid; font-size:13.0pt; font-family:Arial;} h5 {margin-top:12.0pt; margin-right:0in; margin-bottom:3.0pt; margin-left:0in; font-size:13.0pt; font-family:"Franklin Gothic Book"; font-style:italic;} p.MsoNormalIndent, li.MsoNormalIndent, div.MsoNormalIndent {margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:.5in; margin-bottom:.0001pt; font-size:11.0pt; font-family:"Franklin Gothic Book";} p.MsoList, li.MsoList, div.MsoList {margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:.25in; margin-bottom:.0001pt; text-indent:-.25in; font-size:11.0pt; font-family:"Franklin Gothic Book";} p.MsoListBullet, li.MsoListBullet, div.MsoListBullet {margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:.25in; margin-bottom:.0001pt; text-indent:-.25in; mso-list:l9 level1 lfo1; font-size:11.0pt; font-family:"Franklin Gothic Book";} p.MsoListNumber, li.MsoListNumber, div.MsoListNumber {margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:.25in; margin-bottom:.0001pt; text-indent:-.25in; mso-list:l8 level1 lfo6; font-size:11.0pt; font-family:"Franklin Gothic Book";} p.MsoList2, li.MsoList2, div.MsoList2 {margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:.5in; margin-bottom:.0001pt; text-indent:-.25in; font-size:11.0pt; font-family:"Franklin Gothic Book";} p.MsoList3, li.MsoList3, div.MsoList3 {margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:.75in; margin-bottom:.0001pt; text-indent:-.25in; font-size:11.0pt; font-family:"Franklin Gothic Book";} p.MsoList4, li.MsoList4, div.MsoList4 {margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:1.0in; margin-bottom:.0001pt; text-indent:-.25in; font-size:11.0pt; font-family:"Franklin Gothic Book";} p.MsoList5, li.MsoList5, div.MsoList5 {margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:1.25in; margin-bottom:.0001pt; text-indent:-.25in; font-size:11.0pt; font-family:"Franklin Gothic Book";} p.MsoListBullet2, li.MsoListBullet2, div.MsoListBullet2 {margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:.5in; margin-bottom:.0001pt; text-indent:-.25in; mso-list:l7 level1 lfo2; font-size:11.0pt; font-family:"Franklin Gothic Book";} p.MsoListBullet3, li.MsoListBullet3, div.MsoListBullet3 {margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:.75in; margin-bottom:.0001pt; text-indent:-.25in; mso-list:l6 level1 lfo3; font-size:11.0pt; font-family:"Franklin Gothic Book";} p.MsoListBullet4, li.MsoListBullet4, div.MsoListBullet4 {margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:1.0in; margin-bottom:.0001pt; text-indent:-.25in; mso-list:l5 level1 lfo4; font-size:11.0pt; font-family:"Franklin Gothic Book";} p.MsoListBullet5, li.MsoListBullet5, div.MsoListBullet5 {margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:1.25in; margin-bottom:.0001pt; text-indent:-.25in; mso-list:l4 level1 lfo5; font-size:11.0pt; font-family:"Franklin Gothic Book";} p.MsoListNumber2, li.MsoListNumber2, div.MsoListNumber2 {margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:.5in; margin-bottom:.0001pt; text-indent:-.25in; mso-list:l3 level1 lfo7; font-size:11.0pt; font-family:"Franklin Gothic Book";} p.MsoListNumber3, li.MsoListNumber3, div.MsoListNumber3 {margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:.75in; margin-bottom:.0001pt; text-indent:-.25in; mso-list:l2 level1 lfo8; font-size:11.0pt; font-family:"Franklin Gothic Book";} p.MsoListNumber4, li.MsoListNumber4, div.MsoListNumber4 {margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:1.0in; margin-bottom:.0001pt; text-indent:-.25in; mso-list:l1 level1 lfo9; font-size:11.0pt; font-family:"Franklin Gothic Book";} p.MsoListNumber5, li.MsoListNumber5, div.MsoListNumber5 {margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:1.25in; margin-bottom:.0001pt; text-indent:-.25in; mso-list:l0 level1 lfo10; font-size:11.0pt; font-family:"Franklin Gothic Book";} p.MsoTitle, li.MsoTitle, div.MsoTitle {margin-top:12.0pt; margin-right:0in; margin-bottom:3.0pt; margin-left:0in; text-align:center; font-size:16.0pt; font-family:"Franklin Gothic Book"; font-weight:bold;} p.MsoBodyText, li.MsoBodyText, div.MsoBodyText {margin-top:0in; margin-right:0in; margin-bottom:6.0pt; margin-left:0in; font-size:11.0pt; font-family:"Franklin Gothic Book";} p.MsoListContinue, li.MsoListContinue, div.MsoListContinue {margin-top:0in; margin-right:0in; margin-bottom:6.0pt; margin-left:.25in; font-size:11.0pt; font-family:"Franklin Gothic Book";} p.MsoListContinue2, li.MsoListContinue2, div.MsoListContinue2 {margin-top:0in; margin-right:0in; margin-bottom:6.0pt; margin-left:.5in; font-size:11.0pt; font-family:"Franklin Gothic Book";} p.MsoListContinue3, li.MsoListContinue3, div.MsoListContinue3 {margin-top:0in; margin-right:0in; margin-bottom:6.0pt; margin-left:.75in; font-size:11.0pt; font-family:"Franklin Gothic Book";} p.MsoListContinue4, li.MsoListContinue4, div.MsoListContinue4 {margin-top:0in; margin-right:0in; margin-bottom:6.0pt; margin-left:1.0in; font-size:11.0pt; font-family:"Franklin Gothic Book";} p.MsoListContinue5, li.MsoListContinue5, div.MsoListContinue5 {margin-top:0in; margin-right:0in; margin-bottom:6.0pt; margin-left:1.25in; font-size:11.0pt; font-family:"Franklin Gothic Book";} p.MsoMessageHeader, li.MsoMessageHeader, div.MsoMessageHeader {margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:.75in; margin-bottom:.0001pt; text-indent:-.75in; background:#D9D9D9; border:none; padding:0in; font-size:12.0pt; font-family:"Franklin Gothic Book";} p.MsoBodyText2, li.MsoBodyText2, div.MsoBodyText2 {margin-top:0in; margin-right:0in; margin-bottom:6.0pt; margin-left:0in; line-height:200%; font-size:10.0pt; font-family:"Franklin Gothic Book";} p.MsoBodyText3, li.MsoBodyText3, div.MsoBodyText3 {margin-top:0in; margin-right:0in; margin-bottom:6.0pt; margin-left:0in; font-size:8.0pt; font-family:"Franklin Gothic Book";} a:link, span.MsoHyperlink {color:blue; text-decoration:underline;} a:visited, span.MsoHyperlinkFollowed {color:purple; text-decoration:underline;} p.MsoAcetate, li.MsoAcetate, div.MsoAcetate {margin:0in; margin-bottom:.0001pt; font-size:8.0pt; font-family:Tahoma;} p.TitleHeader, li.TitleHeader, div.TitleHeader {margin:0in; margin-bottom:.0001pt; line-height:200%; font-size:12.0pt; font-family:"Trebuchet MS";} p.Sub-MessageHeader, li.Sub-MessageHeader, div.Sub-MessageHeader {margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:.75in; margin-bottom:.0001pt; text-indent:-.75in; background:#D9D9D9; border:none; padding:0in; font-size:10.0pt; font-family:"Franklin Gothic Book"; font-style:italic;} p.SectionHeader, li.SectionHeader, div.SectionHeader {margin-top:0in; margin-right:0in; margin-bottom:0in; margin-left:.75in; margin-bottom:.0001pt; text-indent:-.75in; background:#D9D9D9; border:none; padding:0in; font-size:16.0pt; font-family:"Franklin Gothic Medium";} span.EmailStyle47 {mso-style-type:personal-compose; font-family:Arial; color:windowtext;} span.code {font-family:"Courier New"; color:#0000AA;} @page Section1 {size:8.5in 11.0in; margin:1.0in 1.25in 1.0in 1.25in;} div.Section1 {page:Section1;} /* List Definitions */ @list l0 {mso-list-id:-132; mso-list-type:simple; mso-list-template-ids:632603720;} @list l0:level1 {mso-level-style-link:"List Number 5"; mso-level-tab-stop:1.25in; mso-level-number-position:left; margin-left:1.25in; text-indent:-.25in;} @list l1 {mso-list-id:-131; mso-list-type:simple; mso-list-template-ids:-1297821960;} @list l1:level1 {mso-level-style-link:"List Number 4"; mso-level-tab-stop:1.0in; mso-level-number-position:left; margin-left:1.0in; text-indent:-.25in;} @list l2 {mso-list-id:-130; mso-list-type:simple; mso-list-template-ids:93912562;} @list l2:level1 {mso-level-style-link:"List Number 3"; mso-level-tab-stop:.75in; mso-level-number-position:left; margin-left:.75in; text-indent:-.25in;} @list l3 {mso-list-id:-129; mso-list-type:simple; mso-list-template-ids:1136925102;} @list l3:level1 {mso-level-style-link:"List Number 2"; mso-level-tab-stop:.5in; mso-level-number-position:left; text-indent:-.25in;} @list l4 {mso-list-id:-128; mso-list-type:simple; mso-list-template-ids:2039778894;} @list l4:level1 {mso-level-number-format:bullet; mso-level-style-link:"List Bullet 5"; mso-level-text:\F0B7; mso-level-tab-stop:1.25in; mso-level-number-position:left; margin-left:1.25in; text-indent:-.25in; font-family:Symbol;} @list l5 {mso-list-id:-127; mso-list-type:simple; mso-list-template-ids:648035400;} @list l5:level1 {mso-level-number-format:bullet; mso-level-style-link:"List Bullet 4"; mso-level-text:\F0B7; mso-level-tab-stop:1.0in; mso-level-number-position:left; margin-left:1.0in; text-indent:-.25in; font-family:Symbol;} @list l6 {mso-list-id:-126; mso-list-type:simple; mso-list-template-ids:-253723446;} @list l6:level1 {mso-level-number-format:bullet; mso-level-style-link:"List Bullet 3"; mso-level-text:\F0B7; mso-level-tab-stop:.75in; mso-level-number-position:left; margin-left:.75in; text-indent:-.25in; font-family:Symbol;} @list l7 {mso-list-id:-125; mso-list-type:simple; mso-list-template-ids:-1716881046;} @list l7:level1 {mso-level-number-format:bullet; mso-level-style-link:"List Bullet 2"; mso-level-text:\F0B7; mso-level-tab-stop:.5in; mso-level-number-position:left; text-indent:-.25in; font-family:Symbol;} @list l8 {mso-list-id:-120; mso-list-type:simple; mso-list-template-ids:-1868502988;} @list l8:level1 {mso-level-style-link:"List Number"; mso-level-tab-stop:.25in; mso-level-number-position:left; margin-left:.25in; text-indent:-.25in;} @list l9 {mso-list-id:-119; mso-list-type:simple; mso-list-template-ids:-122533968;} @list l9:level1 {mso-level-number-format:bullet; mso-level-style-link:"List Bullet"; mso-level-text:\F0B7; mso-level-tab-stop:.25in; mso-level-number-position:left; margin-left:.25in; text-indent:-.25in; font-family:Symbol;} ol {margin-bottom:0in;} ul {margin-bottom:0in;} --> </style> </head> <body lang=3DEN-US link=3Dblue vlink=3Dpurple> <div class=3DSection1> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>I have been using log4net for some time now on all = my personal projects and recently have been tasked with giving a = presentation on the log4net framework. I may asking a few of these over the next week = but the first one that I have is on the loggerRepository. I am not too = sure exactly what it is. Is it just a collection for the = loggers? After reading the repository section, I see that it is an advanced feature, = but I am puzzled by the following section :<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>“</span></font><font size=3D1 = face=3DVerdana><span style=3D'font-size:8.5pt;font-family:Verdana'>This can be very useful = to component developers that wish to use log4net for their components = <b><span style=3D'font-weight:bold'>but do not want to require that all the = applications that use their component are aware of log4net</span></b>. It also means = that their debugging configuration is separated from the applications = configuration. The assembly should specify the </span></font><span class=3Dcode><font = size=3D1 color=3D"#0000aa" face=3D"Courier New"><span = style=3D'font-size:8.5pt'>RepositoryAttribute</span></font></span><font size=3D1 face=3DVerdana><span = style=3D'font-size:8.5pt;font-family:Verdana'> to set its logging repository.”</span></font><font size=3D2 = face=3DArial><span style=3D'font-size:10.0pt;font-family:Arial'><o:p></o:p></span></font></= p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>The embolden part is what I am most confused = about. How would it be that applications that use my components not be aware = of log4net. They would still need to have log4net in their bin = folder if the assembly is not installed in the GAC = right?<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>Also, I was wondering if anyone out there has found = a way to implement log4net without having to declare a static logger in each class. Kind of like just having a static class that you could = call from any class and maybe pass in the name of the logger each time you used = it. I am trying to conceptualize a way to use log4net without having to have developers know what it takes to implement it on each page. = <o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'><o:p> </o:p></span></font></p> <p class=3DMsoNormal><font size=3D2 face=3DArial><span = style=3D'font-size:10.0pt; font-family:Arial'>Any help you can provide in these two areas would be beneficial. Thanks in advance.<o:p></o:p></span></font></p> <p class=3DMsoNormal><font size=3D1 face=3D"Franklin Gothic Book"><span style=3D'font-size:7.5pt'> </span></font> <o:p></o:p></p> <p class=3DMsoNormal><font size=3D2 color=3Dblack face=3DTahoma><span = style=3D'font-size: 10.0pt;font-family:Tahoma;color:black'>Rich Denis</span></font><font = size=3D1 face=3DTahoma><span style=3D'font-size:8.0pt;font-family:Tahoma'><br> </span></font><b><font size=3D1 color=3Dred face=3DTahoma><span = lang=3DEN-GB style=3D'font-size:9.0pt;font-family:Tahoma;color:red;font-weight:bold'>= perot</span></font></b><b><font size=3D1 color=3Dblack face=3DTahoma><span lang=3DEN-GB = style=3D'font-size:9.0pt; font-family:Tahoma;color:black;font-weight:bold'>systems</span></font></= b><b><font size=3D1 color=3Dblack face=3DTahoma><span = style=3D'font-size:9.0pt;font-family:Tahoma; color:black;font-weight:bold'>™</span></font></b><o:p></o:p></p> <p class=3DMsoNormal><font size=3D1 color=3Dblack face=3DArial><span = style=3D'font-size: 7.5pt;font-family:Arial;color:black'>Office: = T1211</span></font><o:p></o:p></p> <p class=3DMsoNormal><font size=3D1 color=3Dblack face=3DTahoma><span = style=3D'font-size: 8.0pt;font-family:Tahoma;color:black'><a = href=3D"mailto:[email protected]" title=3D"mailto:[email protected]"><font size=3D1 face=3DArial><span style=3D'font-size:7.5pt;font-family:Arial'>[email protected]</span></fo= nt></a></span></font><o:p></o:p></p> <p class=3DMsoNormal><font size=3D2 face=3D"Franklin Gothic = Book"><o:p> </o:p></font></p> </div> </body> </html> ------_=_NextPart_001_01C3FBC1.02D95A8A-- ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click