Commit Graph

153 Commits

Author SHA1 Message Date
Riccardo Spagni de68b00596
Merge pull request #1948
62efe5f6 mlog: direct log category changes to file only (moneromooo-monero)
2017-04-11 00:24:08 +02:00
moneromooo-monero a28950da73
setThreadName moved in new version of easylogging++ 2017-04-10 21:05:56 +01:00
moneromooo-monero a8ac4f0a70
update easylogging++ to latest upstream 2017-04-10 21:05:02 +01:00
moneromooo-monero 62efe5f656
mlog: direct log category changes to file only
Because some people just won't even try to read what is written
and freak out because the word FATAL is in here, despite the
context making it clear it's not an error.
2017-04-01 11:29:43 +01:00
Lee Clagett 287ef36ed8 Fix freebsd build 2017-03-21 10:41:21 -04:00
Riccardo Spagni a85f750ee8
Merge pull request #1893
0effe196 Revert "Increase the log level for the info about log levels" (moneromooo-monero)
2017-03-19 22:59:26 +02:00
moneromooo-monero 0effe196e4
Revert "Increase the log level for the info about log levels"
We want to know which log categories are active.

This reverts commit 4f7bce6d20.
2017-03-19 09:39:28 +00:00
Lee Clagett 50cd179a60 Removed boost/asio.hpp include from epee/string_tools.h 2017-03-18 22:05:14 -04:00
moneromooo-monero 9bf017edf2
http_client: allow cancelling a download 2017-03-05 16:23:34 +00:00
moneromooo-monero 0d90123cac
http_client: allow derived class to get headers at start 2017-03-05 16:23:29 +00:00
Riccardo Spagni e10bf1d6c0
Merge pull request #1805
b7f85a30 mlog: default net.cn to FATAL (moneromooo-monero)
2017-03-03 14:12:21 +02:00
moneromooo-monero b7f85a30cd
mlog: default net.cn to FATAL
Errors in this layer depend on how peers behave, and thus errors
are expected
2017-02-26 11:02:05 +00:00
Nano Akron 4f7bce6d20
Increase the log level for the info about log levels 2017-02-25 14:58:18 +00:00
Lee Clagett 8c84d48caa Updated default RPC timeout from 5 seconds to 15 seconds 2017-02-24 12:55:17 -05:00
Riccardo Spagni 3ac5a785e0
Merge pull request #1762
dcf684c7 http_server_impl_base: set bind message to MGINFO (anonimal)
2017-02-22 09:37:05 +02:00
Riccardo Spagni 1a4298685a
Merge pull request #1766
72deb484 updated fallback nodes (Riccardo Spagni)
33329f5b update version to 0.10.2 (Riccardo Spagni)
04a50a7e update checkpoints.dat (Riccardo Spagni)
c3599fa7 update copyright year, fix occasional lack of newline at line end (Riccardo Spagni)
2017-02-22 09:36:11 +02:00
anonimal dcf684c704
http_server_impl_base: set bind message to MGINFO 2017-02-21 18:30:43 +00:00
Riccardo Spagni c3599fa7b9
update copyright year, fix occasional lack of newline at line end 2017-02-21 19:38:18 +02:00
moneromooo-monero 56586bde9e
mlog: restrict net.p2p to FATAL by default 2017-02-21 17:37:03 +00:00
moneromooo-monero 4bf7849297
mlog: only silence errors for net by default, not net.* 2017-02-20 22:58:29 +00:00
moneromooo-monero efb72e74e2
http_client: add a couple consts 2017-02-20 22:58:21 +00:00
Riccardo Spagni e246dd1443
Merge pull request #1717
8bdc86be protocol: speed up sync by minimizing duplicate work (moneromooo-monero)
61dfa310 epee: fix some log macros not printing context nicely (moneromooo-monero)
2017-02-12 23:28:38 +02:00
Riccardo Spagni 4e7bcad58f
Merge pull request #1713
422ecc98 Fixup choice of easylogging++ vs libunwind stack trace code (moneromooo-monero)
2017-02-12 23:25:42 +02:00
moneromooo-monero 61dfa310d7
epee: fix some log macros not printing context nicely 2017-02-12 17:16:11 +00:00
moneromooo-monero 422ecc98e4
Fixup choice of easylogging++ vs libunwind stack trace code 2017-02-12 13:59:21 +00:00
moneromooo-monero 3b6839cc96
mlog: move log level changes to global level
Makes it more likely to show up
2017-02-12 11:45:22 +00:00
moneromooo-monero 28d0b11fde
mlog: s/Mew/New/ in log 2017-02-12 11:35:04 +00:00
Riccardo Spagni 9ed3e1bb6a
Merge pull request #1693
5d00659e disable ELPP_STACKTRACE_ON_CRASH for android (MoroccanMalinois)
2017-02-11 00:40:17 +02:00
Riccardo Spagni eacf2124b6 Merge pull request #1689
ce7fcbb4 Add server auth to monerod, and client auth to wallet-cli and wallet-rpc (Lee Clagett)
2017-02-11 00:35:25 +02:00
kenshi84 8027ce0c75 extract some basic code from libcryptonote_core into libcryptonote_basic 2017-02-08 22:45:15 +09:00
Lee Clagett ce7fcbb4ae Add server auth to monerod, and client auth to wallet-cli and wallet-rpc 2017-02-06 01:15:41 -05:00
MoroccanMalinois 5d00659e1d disable ELPP_STACKTRACE_ON_CRASH for android 2017-02-06 05:14:15 +00:00
Riccardo Spagni 9547e79af5
Merge pull request #1670
c3d7a198 mlog: probable fix for gmtime_r not being available on windows (moneromooo-monero)
2017-02-04 17:28:23 +02:00
Riccardo Spagni 5da4650cba
Merge pull request #1671
cd34fc65 Use easylogging++'s stack trace facility where possible (moneromooo-monero)
2017-02-04 17:27:54 +02:00
moneromooo-monero cbdfa7576a
mlog: fix default logging being not verbose enough 2017-02-04 12:43:19 +00:00
moneromooo-monero cd34fc655d
Use easylogging++'s stack trace facility where possible
This avoids using libunwind, which often causes trouble.
2017-02-04 12:33:03 +00:00
moneromooo-monero c3d7a198bf
mlog: probable fix for gmtime_r not being available on windows 2017-02-04 11:48:58 +00:00
Riccardo Spagni 5fb3f97a55
Merge pull request #1629
c02e1cb9 Updates to epee HTTP client code   - http_simple_client now uses std::chrono for timeouts   - http_simple_client accepts timeouts per connect / invoke call   - shortened names of epee http invoke functions   - invoke command functions only take relative path, connection     is not automatically performed (Lee Clagett)
2017-02-02 19:32:01 +02:00
Jaquee aa9561909a
GUI: Add install target for epee 2017-01-30 23:29:05 +01:00
Lee Clagett c02e1cb943 Updates to epee HTTP client code
- http_simple_client now uses std::chrono for timeouts
  - http_simple_client accepts timeouts per connect / invoke call
  - shortened names of epee http invoke functions
  - invoke command functions only take relative path, connection
    is not automatically performed
2017-01-25 15:39:32 -05:00
moneromooo-monero 1e8cc6764e
mlog: allow using numerical level as default prefix
eg, 2,foo:ERROR,bar:INFO
2017-01-22 16:54:17 +00:00
Riccardo Spagni cccf4b9889
Merge pull request #1613
13dd102e mlog: fix default level/category mapping (moneromooo-monero)
2017-01-22 11:50:04 -05:00
Riccardo Spagni e12f073f65
Merge pull request #1604
a854cec3 Make stack trace show up in log file with default settings (moneromooo-monero)
2017-01-22 11:41:38 -05:00
Riccardo Spagni ab9c287d92
Merge pull request #1597
4d6976fb undelete epee tests.cpp (moneroexamples)
0fd2508b removing some unsed epee files (moneroexamples)
2017-01-22 11:37:46 -05:00
moneromooo-monero 13dd102e94
mlog: fix default level/category mapping
It was not matching the LOG_PRINT_Lx mapping for 2/3/4
2017-01-22 15:20:55 +00:00
moneromooo-monero a854cec3ba
Make stack trace show up in log file with default settings 2017-01-21 20:28:18 +00:00
moneroexamples 4d6976fbce undelete epee tests.cpp 2017-01-21 10:00:32 +08:00
moneroexamples 0fd2508b89 removing some unsed epee files 2017-01-20 01:05:14 +00:00
moneromooo-monero 5e61687fdf
mlog: allow overriding log format
using the MONERO_LOG_FORMAT environment variable.

Default is:
%datetime{%Y-%M-%d %H:%m:%s.%g}\t%thread\t%level\t%logger\t%loc\t%msg

Field list in easylogging++ documentation.

Don't forget to escape as needed.
2017-01-16 19:43:00 +00:00
moneromooo-monero 5833d66f65
Change logging to easylogging++
This replaces the epee and data_loggers logging systems with
a single one, and also adds filename:line and explicit severity
levels. Categories may be defined, and logging severity set
by category (or set of categories). epee style 0-4 log level
maps to a sensible severity configuration. Log files now also
rotate when reaching 100 MB.

To select which logs to output, use the MONERO_LOGS environment
variable, with a comma separated list of categories (globs are
supported), with their requested severity level after a colon.
If a log matches more than one such setting, the last one in
the configuration string applies. A few examples:

This one is (mostly) silent, only outputting fatal errors:

MONERO_LOGS=*:FATAL

This one is very verbose:

MONERO_LOGS=*:TRACE

This one is totally silent (logwise):

MONERO_LOGS=""

This one outputs all errors and warnings, except for the
"verify" category, which prints just fatal errors (the verify
category is used for logs about incoming transactions and
blocks, and it is expected that some/many will fail to verify,
hence we don't want the spam):

MONERO_LOGS=*:WARNING,verify:FATAL

Log levels are, in decreasing order of priority:
FATAL, ERROR, WARNING, INFO, DEBUG, TRACE

Subcategories may be added using prefixes and globs. This
example will output net.p2p logs at the TRACE level, but all
other net* logs only at INFO:

MONERO_LOGS=*:ERROR,net*:INFO,net.p2p:TRACE

Logs which are intended for the user (which Monero was using
a lot through epee, but really isn't a nice way to go things)
should use the "global" category. There are a few helper macros
for using this category, eg: MGINFO("this shows up by default")
or MGINFO_RED("this is red"), to try to keep a similar look
and feel for now.

Existing epee log macros still exist, and map to the new log
levels, but since they're used as a "user facing" UI element
as much as a logging system, they often don't map well to log
severities (ie, a log level 0 log may be an error, or may be
something we want the user to see, such as an important info).
In those cases, I tried to use the new macros. In other cases,
I left the existing macros in. When modifying logs, it is
probably best to switch to the new macros with explicit levels.

The --log-level options and set_log commands now also accept
category settings, in addition to the epee style log levels.
2017-01-16 00:25:46 +00:00