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

Separate logs from individual wasm modules from general e2core #425

Open
javorszky opened this issue May 3, 2023 · 0 comments
Open

Separate logs from individual wasm modules from general e2core #425

javorszky opened this issue May 3, 2023 · 0 comments

Comments

@javorszky
Copy link
Contributor

Given the following log output:

se2-e2core-1       | {"level":"info","command":"start","version":"dev","module":"server","ident":"d62b7588-d131-4bf2-b90e-7e290c46ee70","namespace":"ns1","fn":"fn1","fqmn":"fqmn://d62b7588-d131-4bf2-b90e-7e290c46ee70/ns1/fn1@79a41018469c668c582501238cd6380f0400076416f0988afcfe05cf0dc8ce9d","time":1683106112,"message":"found module with fqmn"}
se2-e2core-1       | {"level":"info","scope":{"request_id":"28664d72-ad2a-4bf4-8b23-f4d0d0da370f","ident":794397155},"message":"this is a pre message thing"}
se2-e2core-1       | {"level":"info","scope":{"request_id":"28664d72-ad2a-4bf4-8b23-f4d0d0da370f","ident":794397155},"message":"Hello from tenant1 / org1.env1 / ns1 / fn1\nthis is just a version number: version 4:  hurr"}
se2-e2core-1       | {"level":"info","scope":{"request_id":"28664d72-ad2a-4bf4-8b23-f4d0d0da370f","ident":794397155},"message":"I have spoken from the plugin"}
se2-e2core-1       | {"level":"info","command":"start","version":"dev","module":"server","ident":"d62b7588-d131-4bf2-b90e-7e290c46ee70","namespace":"ns1","fn":"fn1","fqmn":"fqmn://d62b7588-d131-4bf2-b90e-7e290c46ee70/ns1/fn1@79a41018469c668c582501238cd6380f0400076416f0988afcfe05cf0dc8ce9d","time":1683106112,"message":"finished execution of the module, sending back data"}

Can you tell which one is from e2core proper, and which one is from the following built plugin:

import { log } from "@suborbital/plugin";

export const run = (input) => {
    let message = "Hello from tenant1 / org1.env1 / ns1 / fn1\n" +
    "this is just a version number: version 4:  " + input;

    log.info("this is a pre message thing")
    log.info(message);
    log.info("I have spoken from the plugin")

    return message;
};

I mean in this instance you can, however without knowing the body of the plugin, there's no way to actually distinguish logs from "this is e2core functionality" from "this is a plugin coming from e2core".

Additionally logs for the end users are not useful because they have no way of accessing them at all.

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

No branches or pull requests

1 participant