Skip to content
This repository was archived by the owner on Feb 5, 2020. It is now read-only.

[LATERA-426] Total logging revamp#3

Open
eugenweissbart wants to merge 6 commits intohydra-billing:masterfrom
eugenweissbart:no_search_execution
Open

[LATERA-426] Total logging revamp#3
eugenweissbart wants to merge 6 commits intohydra-billing:masterfrom
eugenweissbart:no_search_execution

Conversation

@eugenweissbart
Copy link
Copy Markdown

Warning!
The newly uploaded/started processes have to:

  • import org.activiti.latera.bss.logging.Logging on each scripttask where logging is needed
  • get rid of "def log" method and use Logging.log(String msg, String level='info', Logger logger=null) method instead
  • get rid of "def logger = execution.getVariable('logger')" and use def logger = Logging.getLogger(execution) instead

Keep in mind that Logging.log "${msg}" would still work but without logger passed it will perform println("[${level}] ${msg}") instead so there will be no process id in log output
Same goes to HTTPRestProcessor.sendRequest - it has to have a logger=logger parameter otherwise logs will be just println-ed to catalina.out

* Changed groovy path in build.xml
* Added trailing newlines where missing
* Fixed execute method declaration in src/bss/executionListeners/abstract_listener.groovy
* Fixed alignment in src/bss/executionListeners/init_logging.groovy
* Removed unnecessary ignoreSSLIssues call in src/bss/http.groovy
* Shortened getLogger declaration in src/bss/http.groovy
* Fixed imports for src/homs/eventListeners/auto_save_order_data.groovy
* Removed unnecessary orderDataBuffer variable in src/homs/eventListeners/auto_save_order_data.groovy
* Removed commented options in build.xml
* Removed unneeded execution variable definition in src/bss/eventListeners/abstract_listener.groovy
* Re-implemented detailed log functions in src/bss/eventListeners/event_logging.groovy
* Shortened getLogger for src/bss/executionListeners/abstract_listener.groovy too
* Fixed alignment in src/homs/executionListeners/finish_order.groovy
- Logger is no longer stored in execution
- New class - org.activiti.latera.bss.logging.Logging with getLogger and
  log methods
- getLogger() and log() methods removed from abstractListeners
- getLogger() no longer targets DelegateExecutions only but
  ActivitiEvents too - both have getProcessDefinitionId() and
  getProcessInstanceId() methods needed to get a logger with similar
  name
- execute() method removed from abstractListeners - sticking to notify()
  and onEvent()
- log() method removed from HTTPRestProcessor
- Some syntactic sugar to make the code more comfortable to read
- Removed some unneeded declaration modifiers
@eugenweissbart
Copy link
Copy Markdown
Author

eugenweissbart commented May 25, 2018

The already running processes should be fine though (unconfirmed)

<property name="groovy.version" value="1.8.6" />
<property name="java.libs" value="/usr/share/java" />
<property name="groovy.home" value="/usr/local/share/groovy" />
<property name="groovy.version" value="2.4.12" />
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have same changes here https://github.com/latera/activiti-ext/pull/2/files. Remove it from one of PRs or you're gonna deal with merge conflicts.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants