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
f791a5c2a51a2939b9456ae8a5eb288fb288550e
f791a5c2
1 parent
6898ecd2
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 @
f791a5c
...
...
@@ -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 @
f791a5c
...
...
@@ -118,9 +118,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
();
...
...
@@ -128,6 +134,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 @
f791a5c
...
...
@@ -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