Skip to content

Url:Port configuration #3

@ErickXavier

Description

@ErickXavier

Is it possible to use url:port in the url field when calling createLogstash? I tryed and it returns this error bellow:
Could not send message to Logstash - [Cannot read property 'replace' of null]

Here is an example of my code:

if(Services.URL_LOGSTASH.length > 0) {
tags = [Services.logName, process.env.PROFILE_NODE_APPLICATION || 'dev'];
Services.logger = createLogstash(Services.URL_LOGSTASH + ':' + Services.properties.logstashPort, tags);

Services.log = (message, fields, level = 'info') => {
fields.logName = Services.logName;
Services.logger[level](message, fields);
};
} else {
Services.log = (message, fields, level = 'info') => {
fields.logName = Services.logName;
log('LEVEL: ' + level, message, fields);
};
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions