Where do extension logs go? #12855
AaronBeaudoin
announced in
Archive
Replies: 2 comments 4 replies
-
Console logs should still be rendered in stdout of wherever you're running Directus 🤔 Console.log doesn't use the same logger as regular Directus, so the log_level configuration doesn't affect it |
Beta Was this translation helpful? Give feedback.
4 replies
-
Use the export default ({ filter }, { logger }) => {
filter("items.create", () => {
logger.info("test");
});
}; Apparently the regular |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm probably missing something, but when I create a new "hook" extension and copy the
dist/index.js
file toextensions/hooks/<name>/index.js
as instructed, I don't actually get any logs. I can see that the extension was loaded successfully in the server log, but I don't actually get the message my extension is supposed to log. Here is thesrc/index.js
file:To test it, I simply create a new item in a test collection I created in the admin UI. When I do, no "test" message is outputted in the server log. Do I need to change the log level or something?
EDIT: Changing the log level doesn't seem to solve the problem.
Beta Was this translation helpful? Give feedback.
All reactions