You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-dev@logging.apache.org by javijava <we...@gmail.com> on 2010/01/14 17:51:41 UTC

Log file with username!!!

Hi, i'm trying to create a log file with tihs name:   user_name_ddmmyy
The problem is that i dont know how to append the username to the fielname.

first, i get the user name :

 log4net.ThreadContext.Properties["Log_User"] = UserName;

Then in the webconfig I have:


appender name="FileAppender" type="log4net.Appender.RollingFileAppender">
    
      
    
      
      
      
  
    <!--   -->
      
      
      <layout type="log4net.Layout.PatternLayout">
        
      </layout>
    </appender>

But  the DatePattern  appends a "LoA.D._U58er"  text.

Anyone knows how can I put this property into the filename?

Thanks

-- 
View this message in context: http://old.nabble.com/Log-file-with-username%21%21%21-tp27164412p27164412.html
Sent from the Log4net - Dev mailing list archive at Nabble.com.