Commit graph

16 commits

Author SHA1 Message Date
Tor Lillqvist
8c404e700e Add FIXME about systemd logging mechanism considerations
If we can find out that we are running under systemd, we probably
shouldn't bother with any timestamps in our logging. Systemd does
that, doesn't it?
2016-09-27 15:53:48 +03:00
Jan Holesovsky
0409243683 Log either to file or the console, not to both.
Change-Id: Iac1e74d0624c2bbac4ffaf99b11488f02e626a2a
2016-09-27 14:36:39 +02:00
Jan Holesovsky
0467f84a6f Actually move the check for tty where we check for various envvars etc.
Change-Id: Ib05208770f9e1865fd322302b861108f351607da
2016-09-27 14:34:41 +02:00
Jan Holesovsky
429cc9d49b Only use color output if we are not redirected to a file.
Change-Id: I494a6bcfa4505d28e0f028c3e8de955c18bb58dd
2016-09-27 11:30:52 +02:00
Tor Lillqvist
8207412c02 Poco::Thread::current() is not reliable for logging
It can return null for no obvious reason, leading to misleading
logging where the same thread is identified as numer zero at one place
and non-zero at another. So use the actual Linux thread id in logging.

Sure, thread ids are somewhat less convenient, as they are larger
numbers, from the same number space as process ids.
2016-09-20 13:32:43 +03:00
Ashod Nakashian
492268913b loolwsd: grep-friendly logs
Log entries now prefix the log-level so
it is now trivial to filter-in or -out
a particular class of logs (for example
errors).

Change-Id: I8033d1780a49dd8a3244e63f867377f0c64e9d9f
Reviewed-on: https://gerrit.libreoffice.org/28520
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-31 04:36:56 +00:00
Miklos Vajna
c47c4fe5a4 Log: clean up unnecessary channelConsole
splitterChannel can be a raw pointer, at the end it'll be assigned to
channel, which does not call duplicate() on it. As a side effect this
fixes the use-after-free warnings reported by clang-tidy.

Change-Id: I8f5d7c9f6c8f280c9f1222c2ab6d7b0fddf64a30
Reviewed-on: https://gerrit.libreoffice.org/28145
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 16:49:20 +00:00
Ashod Nakashian
08909b2a3d loolwsd: doxygen comments added to all classes
Change-Id: Ia485c2dcec20a6840d46836a61f75a8e7e8762ed
Reviewed-on: https://gerrit.libreoffice.org/28128
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-15 03:12:31 +00:00
Ashod Nakashian
0c91e33133 loolwsd: logging to file support
Change-Id: Ie18c6d7c3563078becb9d42e81ef3b6a14288e98
Reviewed-on: https://gerrit.libreoffice.org/27976
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-08 03:58:08 +00:00
Ashod Nakashian
026a22abc3 loolwsd: dump incoming commands
Change-Id: I3d77d0c645c0bdd7e9edfbc8d90d5df6cc1b927a
Reviewed-on: https://gerrit.libreoffice.org/27954
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-08 03:47:32 +00:00
Ashod Nakashian
5b639c3a2d loolwsd: use log settings from the config XML
Change-Id: I0384d97b5411d3ff537b344e67f166daa65630c1
Reviewed-on: https://gerrit.libreoffice.org/27951
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-08-08 03:46:06 +00:00
Tor Lillqvist
4aaf70bf8e The logging goes to stderr, not stdout
Check whether stderr goes to a terminal, not whether stdout does.
2016-04-22 13:24:35 +03:00
Miklos Vajna
5e2937bf79 Log: strcpy -> strncpy
Change-Id: I2929ad46b422e6e55e198064c2930028df844630
2016-04-20 09:10:30 +02:00
Miklos Vajna
b1b947cfb3 loolwsd: fix -Werror,-Wlogical-not-parentheses
Change-Id: I035347339cf789e49994640b03f239a3e161f9b7
2016-04-18 08:40:03 +02:00
Michael Meeks
448e25f6d8 Make logging signal safe again. snprintf: simpler, safer, faster. 2016-04-15 21:53:10 +01:00
Ashod Nakashian
322a3c1afe loolwsd: logging moved to own files
Change-Id: Idf1dd91cf37675e1bea8aeb5d9e8cf6d2ac9a725
Reviewed-on: https://gerrit.libreoffice.org/24099
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-04-15 01:07:13 +00:00