Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add logging.ini to docker config #2010

Merged
merged 4 commits into from
Sep 28, 2019

Conversation

pmconrad
Copy link
Contributor

Resolves #1723

Note: IMO the docker build requires an overhaul. Will create a separate ticket for that.

@abitmore abitmore added this to the 4.1.0 - Feature Release milestone Sep 24, 2019
@oxarbitrage oxarbitrage self-requested a review September 26, 2019 11:37
Copy link
Member

@oxarbitrage oxarbitrage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need to add the logging file in https://github.com/bitshares/bitshares-core/blob/develop/Dockerfile#L76

With that the file is created in etc:

$ docker run bitshares:latest ls /etc/bitshares
config.ini
logging.ini
version
$ 

However i cant find anything in /var/lib/bitshares:

$ docker run bitshares:latest ls /var/lib/bitshares
$ 

I was expecting a blockchain folder in there as:

$ docker run bitshares:latest
...
2622046ms th_a       object_database.cpp:114       open                 ] Opening object database from /var/lib/bitshares/blockchain ...
...

But it seems not happening.

@pmconrad
Copy link
Contributor Author

bitsharesentry.sh creates symlinks in /var/lib/bitshares/ that point to the config files in /etc/bitshares/.
I did it like that with logging.ini because that's the previous behaviour with config.ini. I don't like it either, which is why I created #2011. This PR only resolves the specific issue in #1723.

@oxarbitrage
Copy link
Member

I still think you need to add the logging.ini into DockerFile.

how do you see the logs this pull request is creating ?

@pmconrad
Copy link
Contributor Author

I run a testnet container with bind-mounting a local directory for /var/lib/bitshares like this:

docker run --name bts-test -d -p 8091:8090 -p 1777:1776  -u bitshares --mount type=bind,src=/bigtmp/blockchains/BTS-Testnet,target=/var/lib/bitshares --restart always --init bitshares/bitshares-core:test-3.3.4

The logs should end up in the same directory, as usual under logs/p2p, logs/default and logs/rpc.
(test-3.3.4 doesn't have these changes yet so it's probably a bad example. But it illustrates the idea.)

@pmconrad
Copy link
Contributor Author

You're right. Fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants