Toggle navigation
Toggle navigation
This project
Loading...
Sign in
grogv3
/
grog-cubi
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
Jean-Francois Leveque
2016-11-02 15:29:39 +0100
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
51fff31d9628a1d7cb1b9f07472f7a00dc3cd510
51fff31d
1 parent
0b9cab5c
https://tree.taiga.io/project/jr-utily-grog-v3/us/72
Mise en place de logs TRACE…
… sur mise à jour données
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
0 deletions
src/main/java/org/legrog/web/publisher/PublisherServiceSpring.java
src/main/java/org/legrog/web/publisher/PublisherVersionView.java
src/main/resources/logback.xml
src/main/java/org/legrog/web/publisher/PublisherServiceSpring.java
View file @
51fff31
...
...
@@ -6,6 +6,8 @@ import org.legrog.entities.PublisherRepository;
import
org.legrog.entities.PublisherVersion
;
import
org.legrog.entities.PublisherVersionRepository
;
import
org.legrog.web.xyz.SharedService
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
javax.ejb.Stateless
;
import
javax.inject.Inject
;
...
...
@@ -21,6 +23,8 @@ import java.util.Set;
@Stateless
public
class
PublisherServiceSpring
implements
PublisherService
{
Logger
logger
=
LoggerFactory
.
getLogger
(
getClass
());
@Inject
PublisherRepository
publisherRepository
;
...
...
@@ -42,6 +46,7 @@ public class PublisherServiceSpring implements PublisherService {
}
public
void
addVersionToPublisher
(
Publisher
publisher
,
PublisherVersion
publisherVersion
)
{
logger
.
trace
(
"debut addVersionToPublisher, publisherVersion = {}"
,
publisherVersion
);
Set
<
PublisherVersion
>
publisherVersionSet
=
publisher
.
getVersions
();
publisherVersionSet
.
add
(
publisherVersion
);
publisher
.
setVersions
(
publisherVersionSet
);
...
...
@@ -50,6 +55,7 @@ public class PublisherServiceSpring implements PublisherService {
publisherVersion
.
setPublisherVersionDatetime
(
new
Timestamp
(
new
Date
().
getTime
()));
this
.
savePublisherVersion
(
publisherVersion
);
this
.
savePublisher
(
publisher
);
logger
.
trace
(
"fin addVersionToPublisher, publisherVersion = {}"
,
publisherVersion
);
}
public
void
validatePublisherVersion
(
Publisher
publisher
,
Integer
publisherVersionId
)
{
...
...
src/main/java/org/legrog/web/publisher/PublisherVersionView.java
View file @
51fff31
...
...
@@ -119,9 +119,15 @@ public class PublisherVersionView implements Serializable {
}
public
void
update
()
{
logger
.
trace
(
"debut update, attributs locaux, publisherActive = {} publisherAddressCountry = {} publisherAddressLocality = {} publisherAddressRegion = {} publisherEmail = {} publisherHistory = {} publisherName = {} publisherPostalCode = {} publisherPostOfficeBoxNumber = {} publisherStreetAddress = {} publisherTelephone {} publisherURL {}"
,
publisherActive
,
publisherAddressCountry
,
publisherAddressLocality
,
publisherAddressRegion
,
publisherEmail
,
publisherHistory
,
publisherName
,
publisherPostalCode
,
publisherPostOfficeBoxNumber
,
publisherStreetAddress
,
publisherTelephone
,
publisherURL
);
PublisherVersion
publisherVersion
=
new
PublisherVersion
();
setValues
(
publisherVersion
);
logger
.
trace
(
"milieu update, avant enregistrement, publisherVersion = {}"
,
publisherVersion
);
publisherService
.
addVersionToPublisher
(
publisher
,
publisherVersion
);
publisherVersionId
=
publisherVersion
.
getPublisherVersionId
();
...
...
@@ -129,6 +135,7 @@ public class PublisherVersionView implements Serializable {
getImmutableValues
();
editMode
=
false
;
logger
.
trace
(
"fin update, après récupération, publisherVersion = {}"
,
publisherVersion
);
}
public
void
loadData
()
{
...
...
src/main/resources/logback.xml
View file @
51fff31
...
...
@@ -8,6 +8,7 @@
</appender>
<logger
name=
"org.legrog"
level=
"DEBUG"
/>
<logger
name=
"org.legrog.web.publisher"
level=
"TRACE"
/>
<root
level=
"warn"
>
<appender-ref
ref=
"STDOUT"
/>
...
...
Please
register
or
login
to post a comment