Commit graph

16 commits

Author SHA1 Message Date
Ashod Nakashian
b7df3b50a9 loolwsd: Log::syserror and Log::sysfatal now supported as macro
Change-Id: Ic07e7fb46e0b3e01db164e5812ef9256f149e5d9
Reviewed-on: https://gerrit.libreoffice.org/30822
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-14 05:24:04 +00:00
Ashod Nakashian
fd8b426860 loolwsd: use correct log level and not typo
Change-Id: I71a04714c1ad406d454c3312ffa72930293a94c1
Reviewed-on: https://gerrit.libreoffice.org/30620
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-07 06:25:44 +00:00
Ashod Nakashian
b9b69e9534 loolwsd: rename LOG_XXX internal variable to minimize conflicts
Change-Id: I82e98b38a0ac6a5e821148f213aa1b15827e23df
Reviewed-on: https://gerrit.libreoffice.org/30548
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-04 05:02:05 +00:00
Ashod Nakashian
0402256390 Log file and line number using the LOG_XXX macro
Change-Id: Ie157daab8b1f52aba22e87ef07b14e571cc59771
Reviewed-on: https://gerrit.libreoffice.org/30494
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-11-02 13:22:25 +00:00
Ashod Nakashian
8be8311eaa loolwsd: new logging macros with lower overhead
Change-Id: I6889af4dd18692877469e8b24671aaf4649055e5
Reviewed-on: https://gerrit.libreoffice.org/30422
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-31 06:09:59 +00:00
Ashod Nakashian
90c60d9931 loolwsd: more efficient stream logging
Change-Id: I6596f87be4d36d2857c40b88864099c6cb5ab5b0
Reviewed-on: https://gerrit.libreoffice.org/30421
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-31 06:09:17 +00:00
Ashod Nakashian
b14961ffaf loolwsd: logging cleanup
Streaming to string can now be disabled when
the not needed to reduce overhead.

Change-Id: I95e5a700776bd9f05b0d969703fc471401dfea3b
Reviewed-on: https://gerrit.libreoffice.org/30420
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-31 06:08:46 +00:00
Ashod Nakashian
773c15f710 loolwsd: consistent formatting
With the help of clang-format.
For reference, the following command was used,
but not all changes were commited:

clang-format-3.9 -style='{BasedOnStyle: WebKit,
 AlignAfterOpenBracket: Align,
 AlwaysBreakAfterReturnType: None,
 BreakBeforeBraces: Allman,
 DerivePointerAlignment: 'true',
 ExperimentalAutoDetectBinPacking: 'true',
 IndentWrappedFunctionNames: 'true',
 UseTab: Never}'

Change-Id: I0f7490c7ee38aeefeefcf9d5d4c3dab380cd63b8
Reviewed-on: https://gerrit.libreoffice.org/30416
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-10-31 06:06:35 +00:00
Tor Lillqvist
0e047c8a1a Add Log API for the 'FATAL' priority
To be used only for truly fatal configuration or resource errors when
the lool service cannot continue functioning at all.

Add also a sysfatal() variant that appends the strerror(errno)
message, like syserror().
2016-10-14 12:52:03 +03: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
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
Miklos Vajna
e562ea644e Log: mark move constructor noexcept
It's a good practice in general, since otherwise such classes can't be
put into e.g. STL containers.

Change-Id: Iedf8bab45170c3b7721e88493811d8839487ecab
2016-08-03 10:02:14 +02:00
Miklos Vajna
195b72a921 Log: use std::move() when a value is passed
No move would actually happen in the second case.

Change-Id: I7cc7d9e2a55a17d19845e98a0d829b168b614529
2016-08-02 09:29:25 +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