Commit graph

20 commits

Author SHA1 Message Date
Tor Lillqvist
95eb849217 Still more iOS app and related Online C++ code hacking
Re-think the plumbing between the different parts of the C++ Online
code. Do try to have it work more like in real Online on all but the
lowest socket level. Except that we don't have multiple processes, but
threads inside the same process. And instead of using actual system
sockets for WebSocket traffic between the threads, we use our own
FakeSocket things, with no WebSocket framing of messages.

Reduce the amount of #ifdef MOBILEAPP a bit also by compiling in the
UnitFoo things. Hardcode that so that no unit testing is ever
attempted, though. We don't try to dlopen any library.

Corresponding changes in the app Objective-C code. Plus fixes and
functionality improvements.

Now it gets so far that the JavaScript code thinks it has the document
tiles presented, and doesn't crash. But it hangs occasionally. And all
tiles show up blank.

Anyway, progress.

Change-Id: I769497c9a46ddb74984bc7af36d132b7b43895d4
2018-09-19 11:31:18 +03:00
Tor Lillqvist
83a7a6f744 s/StaticNames/StaticNameHelper
It is a container for one name (and used just once even), not several,
so no need for the plural.

Change-Id: I6d8b22f071d5136fb854e6f2c5a6be8b4572b535
2018-09-13 12:06:23 +03:00
Tor Lillqvist
75438baa70 More mobile app stuff, very much early state of work in progress
Re-think Linux vs mobile ifdefs a bit. Use #ifdef __linux only to
surround code that actually is Linux-specific. Use #ifdef MOBILEAPP
for code that is for a mobile version (with no separste wsd, forkit,
and kit processes, and with no WebSocket protocol used).

Bypass UnitFoo for mobile. Possibly we do want the UnitFoo stuff after
all on mobile, to run in some special testing mode? Hard to say, let's
skipt it for now.
2018-09-10 15:13:43 +03:00
Tor Lillqvist
d3f0179c96 Make this file compile for iOS 2018-08-29 20:39:26 +03:00
Miklos Vajna
9ed7c1065c common, kit, test, wsd: these parameters are copied for each invocation ...
... but passing by const ref is enough
2018-08-13 09:26:15 +02:00
Tor Lillqvist
eae43a262b Drop unused LogPrefix variable
Also gets rid of a potentially problematic strncpy() use that causes a
gcc warning: specified bound 256 equals destination size
[-Werror=stringop-truncation].

(Whether that would have caused a problem or not depends on how
LogPrefix would have been used, and whether it ever would have been
filled completely, without any terminating nul character, by that
strncpy().)

Change-Id: I92dba3726e3f46777d9b4c8cf88f557c02788fe0
2018-07-19 12:16:19 +03:00
Ashod Nakashian
b59f5c2c65 wsd: log proper ISO date in YYYY-MM-DD format
Change-Id: I8851c044bad43a03a99f7471be97ea77c58f7be8
Reviewed-on: https://gerrit.libreoffice.org/53266
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/53316
(cherry picked from commit d50850337b1cad5ce93678079085a97316f1f48e)
Reviewed-on: https://gerrit.libreoffice.org/53318
2018-04-23 11:53:23 +02:00
Ashod Nakashian
c06376cc1d wsd: cleanup logging and remove unused helpers
Now all logging is done after checking if the
level in question is enabled or not (thanks to
the macros LOG_XXX), which saves unnecessary
conversions and stringification when said level
is disabled.

Change-Id: Icde31e067f60269563896f04f8b0d65643720766
Reviewed-on: https://gerrit.libreoffice.org/47885
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2018-01-19 00:33:40 +01:00
Pranav Kant
f63858433b loplugin:includeform
Change-Id: Ib62a7aa61062f00698aa3e8a144438de5c57e53d
2017-12-20 21:21:05 +05:30
Pranav Kant
af13e5927d Open the log channel explicitly to avoid file creation inside jail
Change-Id: Ida66861e0e1c5925dbbf53d564a829eaf0fd15c7
2017-07-12 15:14:58 +05:30
Michael Meeks
08c70f1315 Signal safe number logging (lame but useful).
Change-Id: I0b6095fc08dcc237a224b5942ab5a09e6820e43f
2017-04-28 19:05:45 +01:00
Michael Meeks
ae0dba1088 Cleanup prctl / gettid system-call thrash on logging.
Makes the strace look much prettier.
2017-03-30 18:14:40 +01:00
Michael Meeks
0eaef6c896 config.h - get includes right: must always be the first include. 2017-03-10 10:47:43 +01:00
Ashod Nakashian
c22e69e9e6 wsd: correct logging of thread ID in log entries
Change-Id: I10aaeeea8df2757362482a405b7525542d150178
Reviewed-on: https://gerrit.libreoffice.org/33857
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-02-03 07:05:06 +00:00
Ashod Nakashian
ffe092f5ce wsd: log cleanup
Change-Id: I569f7a81fa80686810c4d5aa65e03b02be189db7
Reviewed-on: https://gerrit.libreoffice.org/33417
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-23 04:34:38 +00:00
Ashod Nakashian
b9c900d459 wsd: format the time directly in the log prefix
Change-Id: I6ad5faf8fdfa16831863bf4b8fa0568e88d0d0f8
Reviewed-on: https://gerrit.libreoffice.org/33416
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-23 04:33:09 +00:00
Jan Holesovsky
4416c836d0 Log the time in wall-clock time, instead of since the process start.
Otherwise we are getting completely confused times - various processes start
at various times, so for one process the epoch start can be eg. 20 minutes
later than for the other.

Change-Id: I6d87e98682a5fcd0348a584cf66f7ffa5813ca66
2017-01-13 16:14:13 +01:00
Ashod Nakashian
89bd85fbba wsd: put_time is not supported by gcc4.8
Change-Id: Ib3b6a115ba669051474e327944cb4677575d15f3
Reviewed-on: https://gerrit.libreoffice.org/32917
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-10 05:39:48 +00:00
Ashod Nakashian
fe9e95dfa3 wsd: log the time when initializing the logger
Change-Id: I785c2a6a13dedbecf10a96a593f05e13980ea1e6
Reviewed-on: https://gerrit.libreoffice.org/32863
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2017-01-09 06:20:08 +00:00
Michael Meeks
cca657c8f2 Apply the pre-branch rename script to re-organize the source. 2016-11-25 09:58:48 +00:00
Renamed from loolwsd/Log.cpp (Browse further)