Accessing Remote User Logs

Hi there,

We are trying to figure out if there is a good way to either centrally store user log files, or to access them remotely. I’ve been reading the LogManager documentation and while it has some answers for me I thought I’d ask here.

The LogManager could certainly output log files to a centralized storage, but reading other topics here it sounds like that can cause quite a few performance issues.

It also looks like using it only allows access to the current machine’s log files, but if I’m missing something I’d be thrilled to know it.

Any thoughts?

Thanks.

3 Likes

Hey @rthompson

Our log files are stored within the user’s home directory by default (as is documented here). Depending on the OS, you could choose to actually store those directories on a network disk and mount them to the expected path, or override the $SHOTGUN_HOME environment variable to store them elsewhere (also mentioned in the above doc).

A couple things to watch out for:

  • Toolkit processes are writing to those logs constantly, so your performance is beholden to your network speed. We’ve seen a lot of cases where especially in Windows, communication across network drives can be slow, causing slowdowns in your Toolkit performance.
  • If you are going to override $SHOTGUN_HOME, you’ll still want to make sure that your logs are divided by username and/or machine, so you can make sure that you’re looking at the right data when it comes time for debugging. Note though that overriding $SHOTGUN_HOME will also move bundle cache, etc., so there may be unwanted repercussions.

I hope that answers your question? Let us know if you need any clarification.

3 Likes

Hello!

I wanted to follow up, as I got a little more info here:

  • A relatively “low-tech” idea would be to run an rsync between local logs and a central server, either regularly (perhaps on a cron?) with all logs, or on specific logs as needed. You might even consider a “Send logs to server” action in Desktop or the Shotgun Panel for artists to run when necessary
  • There are some repercussions to taking over $SHOTGUN_HOME, as that directory contains more than just logs (caches, etc.), You could try using the initialize_base_handler_from_path() method on the LogManager to specify a path just for logs to write to. As the documentation states, this method is legacy – we don’t anticipate it going away anytime soon, but there’s always the possibility.
1 Like

We use filebeat to upload logs from each user’s machine.

It does take more effort to set up, but the benefits are large - better performance, and easier access to the logs in elasticsearch.

3 Likes

Thank you both so much for the ideas.

The project got shelved because some more pressing work came up but if/when I manage to get back to it I’ll do some testing and let you know what we finally settle on.

Sorry, and thanks again!

2 Likes