Cast logs not appearing locally

Hi, has anyone been able to make the (cast/dev {:msg "something"}), and (cast/event ...) functions print anything locally? If so, what sometimes gave you trouble, how did you make it work?

When I follow the instructions here, I get no errors but no logs either:

This post provides a look at what I tried:

With the current issue we find it difficult to unify our dev and prod parity when different kinds of logging work only in half of our environments.

Because of this, we’re tempted to use SLF4J instead but the logs don’t appear as great in CloudWatch as the cast logs appear:

1 Like

I’ve been suffering from this for a while, and had to just workaround by using println in dev for a while … although, seeing your post inspired me to re-investigate the issue again in my environment, because when I first started the project it was working. I messed around with a lot of different require combinations …

I was finally able to get cast/dev to actually work again in my local environment, once I removed my require call for, something in requiring that was interfering with my cast logging. After discovering that, I was able to still require so long as BOTH the cast init call AND a single/first call to cast/dev was made before requiring dev-local.

Do you think this is the same thing affecting you as well?? Either way, sounds like dev-local OR datomic.ion.cast might have some kind of bug that doesn’t allow them to play well … (unless I’m doing something wrong)

1 Like

:partying_face: Wow thanks a lot Jake, that’s exactly the solution we needed!

CC @jaret you might be interested to know about Jake’s solution. Do you think Cognitect needs to fix something? At least we know the workaround until then. :slight_smile:

1 Like

Awesome! Glad we’re finally getting to the bottom of this (now people can stop telling me that I must be forgetting to call initialize :stuck_out_tongue:)

For reference, I’m using dev-local version: 0.9.232 - and ion lib version: 0.9.48

1 Like

Hi @jmshelby would it be possible to share a small repo? I am assuming from reading this that a project with ion.cast and dev-local will re-create, but I’d like to see if you have anything else contributing.

Apologies for likely being one of the people to tell you to initialize! :slight_smile:

Sure, here’s something I just threw together to demonstrate. It should be the minimum amount to recreate with some of the deps I’m using.