Commit Graph

139 Commits

Author SHA1 Message Date
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
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
Chris Vickio
296f8c160f inline unused function (for unused-function warning) 2017-01-14 13:37:14 +03:00
Lee Clagett
d81cb08704 Added (not yet enabled) HTTP client authentication 2017-01-11 03:21:17 -05:00
Riccardo Spagni
866463f37b
Merge pull request #1514
fa0ee42c Workarounds for gcc 4.8 (Lee Clagett)
2017-01-08 16:41:03 -08:00
Riccardo Spagni
2a996f492f
Merge pull request #1510
80abc3bc Build wallet with Android NDK (MoroccanMalinois)
2017-01-08 16:40:02 -08:00
MoroccanMalinois
80abc3bc4a Build wallet with Android NDK 2017-01-05 01:11:05 +00:00
Lee Clagett
fa0ee42cc9 Workarounds for gcc 4.8 2016-12-30 02:14:06 -05:00
Randi Joseph
52db01ea6d Silence CMake policy warning on macos.
See: https://cmake.org/cmake/help/v3.0/policy/CMP0042.html
2016-12-23 02:54:34 -05:00
Lee Clagett
bdc3d7496f Adding HTTP Digest Auth (but not yet enabled) 2016-12-13 00:19:54 -05:00
Riccardo Spagni
45bb393577
Merge pull request #1403
60633cf6 Spelling in errors (taushet)
2016-12-04 22:30:15 +02:00
Riccardo Spagni
977dd9b76c
Merge pull request #1385
5783dd8c tests: add unit tests for uri parsing (moneromooo-monero)
82ba2108 wallet: add API and RPC to create/parse monero: URIs (moneromooo-monero)
d9001b43 epee: add functions to convert from URL format (ie, %XX values) (moneromooo-monero)
2016-12-04 22:19:06 +02:00
taushet
60633cf674 Spelling in errors 2016-12-04 20:12:40 +01:00
moneromooo-monero
d9001b43ac
epee: add functions to convert from URL format (ie, %XX values) 2016-11-28 17:54:16 +00:00
moneromooo-monero
8b0e04cb12
monero.supp: add a suppression for noisy boost cond var signalling 2016-11-28 09:52:59 +00:00
moneromooo-monero
c3527dafd5
epee: signal cond var before unlocking
This is more canonical, and avoids some helgrind spam
2016-11-28 09:52:49 +00:00
Riccardo Spagni
c36cb54340
Merge pull request #1372
17b6bd6 Fix DNS failures in offline mode preventing daemon startup (moneromooo-monero)
2016-11-24 13:01:35 +02:00
moneromooo-monero
17b6bd6d35
Fix DNS failures in offline mode preventing daemon startup 2016-11-23 23:14:49 +00:00
moneromooo-monero
452aeca5cd
epee: blind attempt to fix exit hang on windows
Thanks to duckduckgo and the internet.

This might even compile.
2016-11-17 22:10:03 +00:00
moneromooo-monero
cd929b89b0
levin: fix wrong value passed as return code to remote call
When receiving an answer packet, the command code was passed
to the callback instead of the error code. This was hiding
the "command not found" failure from the peer, and in turn
causing the code to attempt to deserialize a non existent
reply string.
2016-11-12 10:12:23 +00:00
Riccardo Spagni
d51f1af75f
Merge pull request #1272
48b57d8 monero.supp: valgrind suppressions file (moneromooo-monero)
ffd8c41 ringct: check the size of amount_keys is the same as destinations (moneromooo-monero)
836669d ringct: always shutdown the boost io service (moneromooo-monero)
2016-11-01 21:49:30 +02:00
Lee Clagett
4869db702a adding static_assert to pod functions in string tools 2016-10-31 13:22:21 -04:00
moneromooo-monero
48b57d813c
monero.supp: valgrind suppressions file
Seeded with a spurious problem when inspecting stack trace
2016-10-29 13:34:24 +01:00
NanoAkron
d28db2368e
Unkonown -> unknown 2016-10-27 23:07:37 +01:00
moneromooo-monero
839280d5fc
daemon: add a print_pool_stats daemon command
Helps see what's going on now that Monero is getting used
2016-10-23 16:11:20 +01:00
NanoAkron
6390673137 Removed all code related to fast_exit 2016-10-03 02:06:55 +01:00
zveda
13258422ba This file is for rlwrap for monero 0.10 2016-09-25 00:45:01 +10:00
zveda
8d4674bd85 This file is for rlwrap for monero 0.10 2016-09-25 00:41:45 +10:00
moneromooo-monero
eeb2bbc0fc
epee: optionally restrict HTTP service to a configurable user agent
This is intended to catch traffic coming from a web browser,
so we avoid issues with a web page sending a transfer RPC to
the wallet. Requiring a particular user agent can act as a
simple password scheme, while we wait for 0MQ and proper
authentication to be merged.
2016-09-18 20:32:02 +01:00
redfish
06bb6923c3 cmake: support BUILD_SHARED_LIBS built-in option
Support building internal libraries as shared. This reduces
development time by eliminating the need to re-link all
binaries every time non-interface code in the library changes.
Instead, can hack on libxyz, then `make libxyz`, and re-run
monerod.

By default BUILD_SHARED_LIBS is OFF in release build type,
and ON in debug build type, but can be overriden with -D.
2016-09-18 02:56:26 -04:00
Casey Marshall
823843eadb Fix portability issues discovered with fresh snap install.
ARCH=native fixes SIGILL issues on other amd64 processors.
Static library dependencies where supported.
Package libunbound2 in the snap.
2016-09-11 18:14:38 -05:00
Casey Marshall
0a56d83d3d Add snap packaging.
This adds [snap](https://snapcraft.io) packaging to the project. See the
link for more information on snaps. Snap packages install on all Linux
distributions. On Ubuntu, snap confinement with apparmor and seccomp
provide an additional layer of security.

This snap sets up monerod as a systemd service, which should start
immediately on install. To access the wallet CLI, simply run `monero`
(/snap/bin/monero). I think it's a really quick & easy way to get
started with monero.

I've made some opinionated decisions in the packaging just to kick this
off, but I'm happy to iterate on this stuff.
2016-09-11 11:17:12 -05:00
moneromooo-monero
0d7ce00793
epee: do not try network resolution if loopback worked
Fixes the wallet being unable to connect to the daemon
when there is no NIC.
2016-09-01 18:12:39 +01:00