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

output is not always valid ttl #157

Open
majidaldo opened this issue Nov 15, 2023 · 16 comments
Open

output is not always valid ttl #157

majidaldo opened this issue Nov 15, 2023 · 16 comments

Comments

@majidaldo
Copy link

The default logging goes to stdout. If warnings are produced in the process, then the output is not valid ttl.

Possible solutions:

  • default to logging to a file
  • and/or "wapper" script takes file paths for the log and/or validation/inference.
@afs
Copy link
Contributor

afs commented Nov 16, 2023

Default to have logging output go to stderr.

@majidaldo
Copy link
Author

majidaldo commented Nov 16, 2023

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?

@afs
Copy link
Contributor

afs commented Nov 18, 2023

Looks to me like INFO goes to the same logger.

@HolgerKnublauch
Copy link
Collaborator

FMI: Which parts of my code base actually produce logging messages?

@afs
Copy link
Contributor

afs commented Nov 19, 2023

@majidaldo

but are there "info" log messages?

is that speculation or have you seen INFO messages?

@afs
Copy link
Contributor

afs commented Nov 19, 2023

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
Copy link
Author

@majidaldo

but are there "info" log messages?

is that speculation or have you seen INFO messages?

speculation.

@majidaldo
Copy link
Author

regardless, the logging output should distinguish b/w errors (program must stop) and non-errors (warnings and info).

@HolgerKnublauch
Copy link
Collaborator

It would help if you could provide some details or even a PR. What is the problem specifically?

@WouterLubbers
Copy link

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.

afbeelding

@majidaldo
Copy link
Author

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.

afbeelding

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.

@rmfranken
Copy link
Contributor

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?

@majidaldo
Copy link
Author

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.

@afs
Copy link
Contributor

afs commented Dec 7, 2023

OntDocumentManager.setReadFailureHandler allows for different failure handling choices.

@HolgerKnublauch
Copy link
Collaborator

HolgerKnublauch commented Dec 7, 2023

Thanks, happy to take PRs from anyone...

@majidaldo
Copy link
Author

majidaldo commented Dec 11, 2023

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 

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

5 participants