Open majidaldo opened 10 months ago
Default to have logging output go to stderr.
Default to have logging output go to stderr.
well, for (actual) errors from the log. warnings would be ok. but are there "info" log messages?
Looks to me like INFO goes to the same logger.
FMI: Which parts of my code base actually produce logging messages?
@majidaldo
but are there "info" log messages?
is that speculation or have you seen INFO messages?
FMI: Which parts of my code base actually produce logging messages?
Searching for an import of org.slf4j.Logger
should find the possible places.
@majidaldo
but are there "info" log messages?
is that speculation or have you seen INFO messages?
speculation.
regardless, the logging output should distinguish b/w errors (program must stop) and non-errors (warnings and info).
It would help if you could provide some details or even a PR. What is the problem specifically?
Example of a warning, produced by executing 'shaclinfer'. The SHACL API tries to read owl:imports objects in the input files, but cannot find them.
Example of a warning, produced by executing 'shaclinfer'. The SHACL API tries to read owl:imports objects in the input files, but cannot find them.
thanks.
in this case it shouldn't even be a warning. it should fail and the program should exit with a non-zero code. i get around this with my own program wrapper where i fail the program if there is any exception message in the output. not ideal.
I would disagree that the program should exit - as the error indicates - this is a "WARN". A warning should not cause a failure of the program in my opinion. Isn't it a bit nuclear to stop and fail the whole program because an external ontology could not be imported?
I would disagree that the program should exit - as the error indicates - this is a "WARN". A warning should not cause a failure of the program in my opinion. Isn't it a bit nuclear to stop and fail the whole program because an external ontology could not be imported?
I agree that warnings should not exit.
But Program output should be deterministic. Same output for same input. Here inferencing and validation depends on imported ontologies.
OntDocumentManager.setReadFailureHandler
allows for different failure handling choices.
Thanks, happy to take PRs from anyone...
here's another case where a warning is not acceptable due to malformed (?) uuid.
WARN riot :: [line: 83874, col: 1 ] Bad IRI: Not a valid UUID string: urn:uuid:anon:7e429cf2-12e8-4456-bde5-e1a79004ef1b\n16:12:43
The default logging goes to stdout. If warnings are produced in the process, then the output is not valid ttl.
Possible solutions: