Commit Graph

3617 Commits

Author SHA1 Message Date
moneroexamples
0fd2508b89 removing some unsed epee files 2017-01-20 01:05:14 +00:00
moneromooo-monero
7c0c5c1724
easylogging++: detect DragonFly BSD as a UNIX 2017-01-20 00:33:13 +00:00
Miguel Herranz
cbcdf8ad35 Honor depth in get_peerlist_head method
The method returned depth + 2 because:

- push_back was executed before the condition.
- > instead of >= causing one more iteration.
2017-01-18 21:41:52 +01:00
kenshi84
78d560a933 simplewallet: use MAKE_CORE_RPC_VERSION(1,4) instead of 0x10004 2017-01-18 16:11:18 +09:00
moneromooo-monero
87c658f83b
wallet2_api: add API to set log categories 2017-01-16 21:14:44 +00:00
Howard Chu
843769f88f
Tweak some msg loglevels 2017-01-16 20:42:59 +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
5161f16f4a
easylogging++: enforce recursive mutex
This fixes a hang when logging something which causes some other
logging code to be called
2017-01-16 19:41:17 +00:00
Miguel Herranz
0e0e6c5f39 Reduce to one connection per IP 2017-01-16 18:16:32 +01:00
Riccardo Spagni
71ac698b78
Merge pull request #1585
a480bf6b fixups in logging init calls, and add missing net context in a log (moneromooo-monero)
2017-01-16 08:41:33 -05:00
Riccardo Spagni
deb6728bc3
Merge pull request #1584
990e08f0 Fix PR#1506, off by one in chain height (Howard Chu)
2017-01-16 08:41:15 -05:00
Riccardo Spagni
4b6be1529e
Merge pull request #1583
e389bd9e Makefile: remove mistakenly added local custom target (moneromooo-monero)
2017-01-16 08:40:18 -05:00
Riccardo Spagni
f22dbef28b
Merge pull request #1536
693c1908 wallet: add a node RPC cache layer for simple RPC calls (moneromooo-monero)
d86ae2be wallet2: reuse fake outs when adjusting fee on transfer (moneromooo-monero)
64da0983 core: don't try to deserialize an empty extra to remove a field (moneromooo-monero)
2017-01-16 08:35:42 -05:00
moneromooo-monero
a480bf6b14
fixups in logging init calls, and add missing net context in a log 2017-01-16 10:45:59 +00:00
Howard Chu
990e08f090
Fix PR#1506, off by one in chain height 2017-01-16 10:00:06 +00:00
moneromooo-monero
693c190881
wallet: add a node RPC cache layer for simple RPC calls
Mostly getinfo and get_hard_fork_info, which are called
pretty often. This speeds up transfers as a bonus.
2017-01-16 08:59:15 +00:00
moneromooo-monero
d86ae2bec6
wallet2: reuse fake outs when adjusting fee on transfer
This avoids indirectly leaking the real output to the daemon,
and is faster.

This will still happen for more complex cases, especially
when cancelling a tx and "re-rolling" it.
2017-01-16 08:59:08 +00:00
moneromooo-monero
64da0983d5
core: don't try to deserialize an empty extra to remove a field 2017-01-16 08:59:02 +00:00
moneromooo-monero
e389bd9e60
Makefile: remove mistakenly added local custom target 2017-01-16 08:49:28 +00:00
Riccardo Spagni
ab69d5b367
Merge pull request #1569
16b8b66a specify restore height by YYYY-MM-DD format (kenshi84)
2017-01-15 20:32:57 -05:00
Riccardo Spagni
ac7df193ca
Merge pull request #1522
5833d66f Change logging to easylogging++ (moneromooo-monero)
dc98019b easylogging++: fix logging with static const header only data members (moneromooo-monero)
3b46617b easylogging++: add ELPP_DISABLE_CHECK_MACROS (moneromooo-monero)
6fe39d90 easylogging++: allow clipping a common filename prefix (moneromooo-monero)
43abf6ff easylogging++: add file-only logs (moneromooo-monero)
c313bea4 eayslogging++: Fix bad memory access before opening any files (moneromooo-monero)
0af5d168 easylogging++: avoid creating directory/filename for the builtin default log file (moneromooo-monero)
28362847 easylogging++: allow setting thread names (moneromooo-monero)
ec71ce8d easylogging++: Print thread ID in a nicer way (moneromooo-monero)
2a0bf783 easylogging++: Add logging categories (moneromooo-monero)
c50bbbfe easylogging++: import upstream (moneromooo-monero)
2017-01-15 20:31:16 -05:00
kenshi84
16b8b66adc specify restore height by YYYY-MM-DD format 2017-01-16 10:00:28 +09: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
moneromooo-monero
dc98019b59
easylogging++: fix logging with static const header only data members 2017-01-16 00:18:21 +00:00
moneromooo-monero
3b46617bd9
easylogging++: add ELPP_DISABLE_CHECK_MACROS 2017-01-16 00:18:17 +00:00
moneromooo-monero
6fe39d9017
easylogging++: allow clipping a common filename prefix 2017-01-16 00:18:12 +00:00
moneromooo-monero
43abf6ff45
easylogging++: add file-only logs 2017-01-16 00:18:07 +00:00
moneromooo-monero
c313bea450
eayslogging++: Fix bad memory access before opening any files 2017-01-16 00:18:02 +00:00
moneromooo-monero
0af5d16872
easylogging++: avoid creating directory/filename for the builtin default log file 2017-01-16 00:17:59 +00:00
moneromooo-monero
2836284798
easylogging++: allow setting thread names 2017-01-16 00:17:55 +00:00
moneromooo-monero
ec71ce8d2d
easylogging++: Print thread ID in a nicer way 2017-01-16 00:17:51 +00:00
moneromooo-monero
2a0bf7834c
easylogging++: Add logging categories 2017-01-16 00:17:47 +00:00
moneromooo-monero
c50bbbfedd
easylogging++: import upstream 2017-01-16 00:17:40 +00:00
Riccardo Spagni
e459d8604d
Merge pull request #1578
ce866d1c macro to define core RPC version for avoiding future mistake (kenshi84)
2017-01-15 19:13:45 -05:00
Riccardo Spagni
422a36ca2a
Merge pull request #1581
6da9335a blockchain_import: fix build after tx_pool::add_tx changes (moneromooo-monero)
2017-01-15 19:13:28 -05:00
Riccardo Spagni
ec323d8c3f
Merge pull request #1561
d561f4ad enable clang checks that were disabled (Chris Vickio)
0aefb2f6 remove std::move from return statements (pessimizing-move warning) (Chris Vickio)
629d5b76 change counter from bool to int (deprecated-increment-bool warning) (Chris Vickio)
fb76d439 add extra braces around subobjects (missing-braces warning) (Chris Vickio)
3b6d5f25 make struct/class declarations consistent (mismatched-tags warning) (Chris Vickio)
fcf66925 remove unused fields from network_throttle (unused-private-field warning) (Chris Vickio)
296f8c16 inline unused function (for unused-function warning) (Chris Vickio)
2017-01-15 19:01:08 -05:00
kenshi84
ce866d1cc6 macro to define core RPC version for avoiding future mistake 2017-01-16 07:55:43 +09:00
moneromooo-monero
6da9335a9e
blockchain_import: fix build after tx_pool::add_tx changes 2017-01-15 21:52:56 +00:00
Riccardo Spagni
b2e1568335
Merge pull request #1579
f5f4109f mnemonics: fix language detection with checksum word (moneromooo-monero)
2017-01-15 14:58:09 -05:00
Riccardo Spagni
99ffc49740
Merge pull request #1577
feb499aa core: check block version for alt chains too (moneromooo-monero)
2017-01-15 14:57:30 -05:00
Riccardo Spagni
1207d8ad0d
Merge pull request #1576
ba3968f6 rct: split rct checks between semantics and other (moneromooo-monero)
2017-01-15 14:56:39 -05:00
Riccardo Spagni
c5be70eab4
Merge pull request #1575
b3ca0c62 unit_tests: fix portable serialization tests hardcoded data path (moneromooo-monero)
2017-01-15 14:56:10 -05:00
Riccardo Spagni
9cda94d0aa
Merge pull request #1574
d276a165 wallet2: use at least two rct inputs if possible (moneromooo-monero)
2017-01-15 14:55:40 -05:00
Riccardo Spagni
f00797a1f2
Merge pull request #1573
dea53962 fix timeout in check_connection (Jaquee)
2017-01-15 14:55:12 -05:00
Riccardo Spagni
10c6afd316
Merge pull request #1571
81c384e4 fix do_not_relay not preventing relaying on a timer (moneromooo-monero)
2017-01-15 14:50:10 -05:00
Riccardo Spagni
91083a43be
Merge pull request #1568
5b5017e2 rpc: add a command to get info about the current blockchain (moneromooo-monero)
2017-01-15 14:48:09 -05:00
Riccardo Spagni
31de98793f
Merge pull request #1567
c9f13c5e wallet2: fix tx reroll not updating fee is going up a kB step (moneromooo-monero)
2017-01-15 14:47:44 -05:00
Riccardo Spagni
51baab2112
Merge pull request #1565
50b230d1 core: ensure block size limit is set from the start (moneromooo-monero)
2017-01-15 14:47:17 -05:00
Riccardo Spagni
865f5bef34
Merge pull request #1564
1d317981 Wallet API: add key image import/export functions (Jaquee)
2017-01-15 14:46:52 -05:00
Riccardo Spagni
8bd2c2e551
Merge pull request #1563
36ba311c Prioritize older transactions in the mempool (Miguel Herranz)
2017-01-15 14:46:33 -05:00