Have you verified that you're able to capture the system messages and
write them to a file yourself?

 using (StreamWriter streamWriter = new StreamWriter("test.txt"))
 {
  streamWriter.WriteLine("Hello World");
  streamWriter.WriteLine(getSystemMessages());
 }

Have you tried the other encoding items in the System.Text.Encoding
enumeration?

I don't know how much this will help...are you able to configure your
application to redirect System.Diagnostics.Trace messages to a file? If
you add a system.diagnostics node to your App.Config:

 http://logging.apache.org/log4net/release/faq.html#internalDebug

and verify that messages appears correctly there (using the
TraceAppender) then the problem is definitely with a setting on the
FileAppender.

--- Cuppax <[EMAIL PROTECTED]> wrote:

> If I add this line to the log file, the log files
> completely disappear. I tried putting it within the
> layout element & that brought the logs back, albeit in
> ANSI, rather than Unicode. Is there an alternative?
> 
> I haven't tried the Console logger (working with a
> Windows service).
> 
> Regards,
> Swaminathan
> 
> --- Ron Grabowski <[EMAIL PROTECTED]> wrote:
> 
> > Is it just the FileAppender? What happens when you
> > use a
> > ConsoleAppender? Have you tried setting the encoding
> > property on the
> > FileAppender:
> > 
> > http://tinyurl.com/k8npm
> >
>
http://logging.apache.org/log4net/release/sdk/log4net.Appender.FileAppender.Encoding.html
> > 
> > <appender name="FileAppender"
> > type="log4net.Appender.FileAppender">
> >  ...
> >  <encoding value="System.Text.Encoding.Unicode" />
> > </appender>
> > 
> > --- Cuppax <[EMAIL PROTECTED]> wrote:
> > 
> > > Can someone please tell me a work-around for this?
> > > When I have localized text returned to me by the
> > OS
> > > that I need to log, the rolling file logs contain
> > junk
> > > characters such as: 
> > > ���O�I�����s:
> > >
> >
>
���[�U�[����F���ł��Ȃ����A�܂��̓p�X���[�h���Ԉ��Ă��܂��B
> > >
> >
> �p�����[�^���Ԉ��Ă��܂��B
> > > 
> > > Swami
> > > 
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Tired of spam?  Yahoo! Mail has the best spam
> > protection around 
> > > http://mail.yahoo.com 
> > > 
> > 
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 

Reply via email to