Comments (5)
Can you give us some code examples? Logging errors seems to work for me, if using an annotated algorithm.
from javaps.
Its more accurate to say it eats the stacktraces. When I throw this error JavaPS's default behavior is to show the error code but the stacktrace is lost.
@Slf4j
@Algorithm(version = "1.0.0")
public class TestAlgorithm {
private String input;
private String output;
@LiteralInput(
identifier = "input")
public void setInput(String param) {
this.input= param;
}
@LiteralOutput(
identifier = "output")
public String getOutput() {
return this.output;
}
@Execute
public void runAlgorithm() throws Exception {
throw new Exception("This is a test error");
}
}
Error in javaps.log:
2020-06-25 09:27:57,645 ERROR o.n.j.e.i.EngineImpl [javaps-0] JobId{value=ea6044c0-145f-46d6-86ed-a7fc3ed853c7} failed: This is a test error
Desired stackstrace output in javaps.log:
Caused by: java.lang.Exception: This is a test error
at com.apexxs.atlas.analytics.elevation.TestAlgorithm .runAlgorithm(ViewshedAlgorithm.java:54) ~[analytics-elevation-javaps-1.0.0.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_231]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_231]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_231]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_231]
at org.n52.javaps.algorithm.annotation.ExecuteBinding.execute(ExecuteBinding.java:59) ~[engine-1.6.0-SNAPSHOT.jar:?]
... 8 more
09:34:43.110 [javaps-0] INFO org.n52.javaps.engine.impl.EngineImpl - Job '72e15590-b2f0-4949-821b-52231dc09e10' execution finished. Status: Failed;
09:34:43.114 [http-nio-8081-exec-1] TRACE org.n52.iceland.config.spring.ProviderAwareListableBeanFactory - Returning cached instance of singleton bean 'engineExceptionAdvice'
from javaps.
Additionally logging doesn't seem to work unless an error is thrown from my algorithm.
@Slf4j
@Algorithm(version = "1.0.0")
public class TestAlgorithm {
private String input;
private String output;
@LiteralInput(
identifier = "input")
public void setInput(String param) {
this.input= param;
}
@LiteralOutput(
identifier = "output")
public String getOutput() {
return this.output;
}
@Execute
public void runAlgorithm() throws Exception {
log.error("This does not log.");
}
}
from javaps.
The default log level for org.n52
loggers is trace
and for all others (well, except for Spring) it is warn
.
Unless you changed the default logging configuration, or if you're using Docker, which has a slightly different configuration, the stack trace of each and every exception should be logged on debug
.
As the log level for the org.n52.javaps.engine.impl.EngineImpl
logger is trace, the stack trace should definitely appear in your logfile...
Could you show us the log4j2.xml
that is used?
from javaps.
The original log XML file was still overriding my attempts at configurations. I was able to replace the existing log XML and that fixed what I was seeing and makes good sense. So this is a non-issue and I will close. Thanks!
from javaps.
Related Issues (11)
- Error when requesting raw data asynchronously
- Engine.run() should throw OutputEncodingException HOT 1
- [WPS4R] Read scripts from symbolic links HOT 1
- Maven install failure on version 1.3.1 HOT 1
- Integration of the REST/JSON binding into the main code base
- Integrate transactional REST features into main code base HOT 1
- Develop HTML renderings for REST endpoints HOT 2
- Concurrency issue with LocalAlgorithmRepository HOT 2
- How to publish & call a command line utility as WPS using JavaPS? HOT 2
- Implement authorization HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javaps.