On Sat, 01 Mar 2014 13:20:39 +0100, Sönke Ludwig wrote:

Am 01.03.2014 12:37, schrieb Roman Shamyan:

How to force vibe use only file logging? I want to use vibe in daemon mode only. Daemon will be created by std d library.

Without any vibe logger settings it throws some exception

core.exception.AssertError@../../../.dub/packages/vibe-d-master/source/vibe/core/log.d(667): Exception during logging:  (Invalid argument)
----------------
./rpc-sql-proxy(_d_assert_msg+0x45) [0x8a9a69]
./rpc-sql-proxy(nothrow void vibe.core.log.rawLog(immutable(char)[], int, vibe.core.log.LogLevel, immutable(char)[])+0x2d6) [0x7ffb02]
./rpc-sql-proxy(nothrow void vibe.core.log.log!("../../../.dub/packages/vibe-d-master/source/vibe/http/server.d", 125, immutable(char)[], immutable(char)[], ushort).log(immutable(char)[], ref immutable(char)[], ref immutable(char)[], ref ushort)+0x17a) [0x81573e]
./rpc-sql-proxy(nothrow void vibe.core.log.logInfo!("../../../.dub/packages/vibe-d-master/source/vibe/http/server.d", 125, immutable(char)[], immutable(char)[], ushort).logInfo(immutable(char)[], immutable(char)[], ref immutable(char)[], ref ushort)+0x3f) [0x8155bb]
./rpc-sql-proxy(void vibe.http.server.listenHTTPPlain(vibe.http.server.HTTPServerSettings, void delegate(vibe.http.server.HTTPServerRequest, vibe.http.server.HTTPServerResponse)).doListen(vibe.http.server.HTTPServerSettings, vibe.http.server.HTTPServerListener, immutable(char)[])+0xeb) [0x87c27f]
./rpc-sql-proxy(void vibe.http.server.listenHTTPPlain(vibe.http.server.HTTPServerSettings, void delegate(vibe.http.server.HTTPServerRequest, vibe.http.server.HTTPServerResponse))+0x353) [0x87c17f]
./rpc-sql-proxy(void vibe.http.server.listenHTTP(vibe.http.server.HTTPServerSettings, void delegate(vibe.http.server.HTTPServerRequest, vibe.http.server.HTTPServerResponse))+0x245) [0x87bd99]
./rpc-sql-proxy(void vibe.http.server.listenHTTP(vibe.http.server.HTTPServerSettings, vibe.http.server.HTTPServerRequestHandler)+0x2f) [0x87be23]
....

Also I've tried to use setLogFile and received the same

setLogLevel(LogLevel.none) should disable all console output (it only
affects the default console logger despite what its historical name may
imply). After that, setLogFile or registerLogger can also be used to
add file or network based logging.

Many Thanks!