Git Product home page Git Product logo

Comments (11)

powerman avatar powerman commented on May 27, 2024

Another workaround is run mono with allocated pseudo-tty using https://github.com/abligh/pty tool: pty mono wdmrc.exe | cat works just fine.

from webdavmailrucloud.

yar229 avatar yar229 commented on May 27, 2024

Edit wdmrc.exe.config, in section <log4net> add

<appender name="ConsoleAppender" type="log4net.Appender.ConsoleAppender" >
  <layout type="log4net.Layout.PatternLayout">
    <conversionPattern value="%date %-5level %logger - %message%newline" />
  </layout>
</appender>
<appender name="RemoteSyslogAppender" type="log4net.Appender.RemoteSyslogAppender">
  <remoteAddress value="127.0.0.1" />
  <layout type="log4net.Layout.PatternLayout, log4net">
    <conversionPattern value="%-5level %logger - %message%newline" />
  </layout>
</appender>
<appender name="LocalSyslogAppender" type="log4net.Appender.LocalSyslogAppender">
  <layout type="log4net.Layout.PatternLayout, log4net">
    <conversionPattern value="%-5level %logger - %message%newline" />
  </layout>
</appender>

in <log4net><root> instead of <appender-ref ref="ColoredConsoleAppender"/> similarly add ConsoleAppender (or RollingLogFileAppender, or RemoteSyslogAppender, or LocalSyslogAppender - if you want)

from webdavmailrucloud.

powerman avatar powerman commented on May 27, 2024

This won't helps. Log output is changes to non-colored or syslog, but even with syslog app still output 3 lines to stdout on start and in all cases when stdout is redirected to not-a-tty mono use 100% CPU.

from webdavmailrucloud.

yar229 avatar yar229 commented on May 27, 2024

How about not using redirect, but RollingFileAppender or

<appender name="FileAppender" type="log4net.Appender.FileAppender">
  <file value="debug.log" />
  <appendToFile value="false" />
  <layout type="log4net.Layout.PatternLayout">
    <conversionPattern value="%-8timestamp [%thread] %-5level %logger - %message%newline" />
  </layout>
</appender>

I'll try to understand what's wrog with redirection

from webdavmailrucloud.

powerman avatar powerman commented on May 27, 2024

All my system services use common way to save logs to files, filter them, rotate, etc. and thus using app-specific way to do same things is inconvenient. Also, just like with syslog, app still outputs 3 lines to stdout on start, which daemons shouldn't do.

from webdavmailrucloud.

powerman avatar powerman commented on May 27, 2024

Also, even with FileAppender (with /dev/stdout as file name) it still outputs few ANSI escape sequences (not suitable for log files):

0000  1b 5b 36 6e 1b 5b 48 1b  5b 4a ef bb bf 49 4e 46  .[6n.[H. [J...INF
0010  4f 20 20 59 61 52 2e 57  65 62 44 61 76 4d 61 69  O  YaR.W ebDavMai
0020  6c 52 75 2e 50 72 6f 67  72 61 6d 20 2d 20 57 65  lRu.Prog ram - We
0030  62 44 41 56 20 73 65 72  76 65 72 20 72 75 6e 6e  bDAV ser ver runn
0040  69 6e 67 20 61 74 20 68  74 74 70 3a 2f 2f 31 32  ing at h ttp://12
0050  37 2e 30 2e 30 2e 31 3a  31 30 38 30 31 0d 0a     7.0.0.1: 10801..

from webdavmailrucloud.

yar229 avatar yar229 commented on May 27, 2024

Thanks, got it, I'll try to fix

from webdavmailrucloud.

powerman avatar powerman commented on May 27, 2024

And FileAppender also outputs BOM (Unicode byte order mark, <0xEF,0xBB,0xBF>) before first line of app output WebDAVCloudMailRu: WebDAV emulator for Cloud.Mail.ru and before first line of log output [1]: WebDAV server running at, which also isn't really suitable for logs (especially because common timestamp gets prepended to log lines, and BOM location became middle of line instead of start of file).

So, for logs we need some output which won't include anything except text - no BOM, no ANSI escapes, and works with redirected stdout/stderr.

from webdavmailrucloud.

yar229 avatar yar229 commented on May 27, 2024

@powerman , plz try 1.5.63
Maybe the same bug

from webdavmailrucloud.

powerman avatar powerman commented on May 27, 2024

I didn't forget about this, just a bit busy last days. I plan to check this in few days.

from webdavmailrucloud.

AliakseiT avatar AliakseiT commented on May 27, 2024

Was the issue for me too. I can confirm it is solved in 1.5.63

from webdavmailrucloud.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.