#Log http Listner startup

1 messages · Page 1 of 1 (latest)

sonic cipher
#

I have a requirement to log http listner startup as a log line, will it possible to log from ballerina itself ?

safe lichen
#

I hope you were looking for this

import ballerina/http;
import ballerina/log;

service / on new http:Listener(9090) {

    function init() returns error? {
        log:printInfo("Started");
    }

    resource function get greeting() returns string {
        return "Hello, World!";
    }
}