Suggestions for logging in Galaxy?

We were trying to use Meteor’s logging package for our project. It worked very well locally, but it didn’t for Galaxy, unfortunately.

That made me curious about what the community normally use for logging that works both locally and on Galaxy, so I can gather some ideas for us to use. So, can you share what you use for logging for your projects? Thanks!

1 Like

Hey! What did not work so well on Galaxy, could you mind sharing a bit about it?

Locally, I’m using the plain old console.log, and for/deployed meteor projects, I think the logging package works fine for most cases.

1 Like

Sure! This is what I got locally:

On Galaxy, instead of getting a color-coded log, with the file and lines being indicated, I got a stringified object instead:


(I get the information I need. It’s just confusing to read…)

Galaxy’s support said that this logging package just isn’t supported yet.

You use this same package for logging on Galaxy? Does it work well for you?

On Galaxy Beta, it looks like this to me:

I’m using logging@1.3.4

We also have this setting enabled:

if (Meteor.settings.public.environment === 'production') {
  Log.outputFormat = 'colored-text';
}

1 Like

That looks great! Thanks for sharing. Does it look the same on the non-beta version of Galaxy? Because the issue I mentioned above happens for both versions for us.

I didn’t test with this setting. What does it do exactly? Because I was already getting colored output locally, and I couldn’t find any docs on this. Maybe I have to set it explicitly for Galaxy? Also, we’re still on Meteor 2.16, in case that’s relevant.

Anyway thanks a lot for sharing these details with me! I’ll go back to experimenting with the package.

@grubba an update. I’ve tested your settings suggestion and it works as we see in the image you shared. It’s way better than what we had before with this package, thanks for your suggestion!

It’s still not perfect, though. For example, the date is logged, which is redundant since Galaxy already logs the date, so it just ends up polluting the logs a little:

Is there any way to remove this log date, so we end up only having Galaxy’s date?

This is a smaller detail, but it would be great if we could add color to warning and error logs, instead of them all being the same color. Is this possible currently for Galaxy?

And, again, thanks for taking your time to help me with this!

1 Like

I’ve made a PR with this option, I’ll let you know here when it is merged and ready to be used

2 Likes