Comments (11)
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.
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.
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.
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.
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.
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.
Thanks, got it, I'll try to fix
from webdavmailrucloud.
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.
@powerman , plz try 1.5.63
Maybe the same bug
from webdavmailrucloud.
I didn't forget about this, just a bit busy last days. I plan to check this in few days.
from webdavmailrucloud.
Was the issue for me too. I can confirm it is solved in 1.5.63
from webdavmailrucloud.
Related Issues (20)
- Linux и терминал HOT 3
- ---- HOT 1
- dotNet - what they're for? HOT 1
- [Linux][Ubuntu 20.04] Не может залогиниться HOT 15
- Message recipient disconnected from message bus without replying
- .NET 5.0 version as service HOT 1
- One or more errors occurred. (Cannot get X-Default-UID) HOT 11
- Error during synchronization in linux (rsync) HOT 2
- Please update to .NET 6.0 HOT 5
- username or password is incorrect HOT 5
- .NET 6 as service HOT 1
- invalid username or password HOT 25
- Filename validation needed.
- Closed
- Unhandled exception. System.Net.HttpListenerException (5): Отказано в доступе. HOT 1
- Яндекс.Диск - перестали скачиваться файлы HOT 15
- Монитирование и работа с диском в проводник HOT 1
- Ошибка при авторизации HOT 13
- «Подарочек» под ёлочку... или новый release форка от ZZZConsulting HOT 4
- System.Net.WebException: Для успешного выполнения этого запроса требуется буферизация данных.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webdavmailrucloud.