Commit graph

14 commits

Author SHA1 Message Date
Tor Lillqvist
4fdd6d684f Reduce redundant information in logging
The logging functions already display the thread name on all output
lines. No need to mention it another time in the thread start and
finish logging messages.
2016-04-07 15:53:53 +03:00
Tor Lillqvist
5637064e9a Factor out the prctl() calls
Silly to keep copy-pasting the same couple of lines over and over
again.
2016-04-07 11:53:33 +03:00
Tor Lillqvist
ec604599f1 Introduce separate Log::syserror() function for logging actual syscall errors
Much better than assuming that errno would be relevant at all
Log::error() calls (or alternatively, having to remember to append a
false parameter to the Log::error() call, which had not been done a
single time anyway.)

Call log::syserror() right after a system call has returned an
error. Don't call it otherwise.
2016-04-07 10:36:38 +03:00
Tor Lillqvist
593d5d7e08 Actually propagate idle/auto save requests to the kit processes
Had to add a shared pointer to the BasicTileQueue for the session to
the MasterProcessSession object, and restructure the coe a a bit to
allocate BasicTileQueue objects dynamically. Possibly just passing a
reference to a BasicTileQueue in the stack would have worked, but why
risk it?

The actual logic when to do auto / idle save is not quite right still,
did not change that in this commit.
2016-04-01 18:57:07 +03:00
Ashod Nakashian
7d2d2aab1c loolwsd: message handling cleanups
Change-Id: I346511819907757bd84895c3751f0cbce4f37084
Reviewed-on: https://gerrit.libreoffice.org/23585
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-29 02:48:28 +00:00
Ashod Nakashian
3217b4592a loolwsd: queue payload changed to vector<char>
All messages now pass through the queue.
This resolves a race between single-line
messages and multi-line ones.

Previously, single-line messages were
processed on the queue (on a background
thread) while multi-line ones were handled
immediatly. This resulted in order-inversion
due to a race between the queue thread and the
next multi-line message, which caused stability
issues every so often.

Change-Id: Ia220791d1d75c4f3e3e0965dd0c6f81bae63a296
Reviewed-on: https://gerrit.libreoffice.org/23583
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-03-29 02:47:27 +00:00
Tor Lillqvist
9f67eecadd Improve exception logging
Always try to identify *where* we caught the exception. It is not that
useful to have half a dozen places that all just log "Exception:".
2016-03-07 18:36:01 +02:00
Tor Lillqvist
9d655cbcc0 Don't pretend this will work on anything except Linux 2016-02-29 14:25:12 +02:00
Miklos Vajna
4b3c5ea8ff loolwsd: doxygenize class comments 2016-01-28 19:16:32 +01:00
Ashod Nakashian
55f2105f00 loolwsd: logging improvements
Change-Id: I77844a2b549c1f497c2d44f054169bf11d9227d8
Reviewed-on: https://gerrit.libreoffice.org/21752
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-24 21:00:34 +00:00
Ashod Nakashian
0cdb8c931f loolwsd: logs
Change-Id: Ib964578ce84eb3dd4b96d483b0e8b53c6cfac853
Reviewed-on: https://gerrit.libreoffice.org/21180
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-07 05:53:56 +00:00
Ashod Nakashian
7bf3fe843a loolwsd: more exception handling
Change-Id: I7ac694395e2c231565bd84a7cd7813498dba387f
Reviewed-on: https://gerrit.libreoffice.org/21163
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-06 14:30:46 +00:00
Ashod Nakashian
f9cfdd9021 loolwsd: reuse QueueHandler
Change-Id: I90dd0cc1457604d85ec82c98af9a457f44968b0d
Reviewed-on: https://gerrit.libreoffice.org/21161
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-06 14:24:58 +00:00
Ashod Nakashian
c3826587e1 loolwsd: moved QueueHandler into own file
Change-Id: I281a9bd12731340673cb66f1f2ac6a133cbe71d0
Reviewed-on: https://gerrit.libreoffice.org/21159
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-06 14:23:39 +00:00