Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
ms_list_certificados
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yonathan Carvajal
ms_list_certificados
Commits
1cfd70ab
Commit
1cfd70ab
authored
Sep 25, 2023
by
Yonathan Carvajal
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cambio en la forma de crear los logs
parent
314103e2
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
27 deletions
+39
-27
Variables_Entorno.text
Variables_Entorno.text
+3
-0
SoapClienteServicio.java
...java/co/com/certicamara/servicio/SoapClienteServicio.java
+3
-6
TrustedServicio.java
...ain/java/co/com/certicamara/servicio/TrustedServicio.java
+4
-3
UtilsXML.java
...cate/src/main/java/co/com/certicamara/utils/UtilsXML.java
+4
-2
log4j.properties
ms-list-certificate/src/main/resources/log4j.properties
+0
-16
logback.xml
ms-list-certificate/src/main/resources/logback.xml
+25
-0
No files found.
Variables_Entorno.text
0 → 100644
View file @
1cfd70ab
export ENV=development
export HOST_TRUSTED=url_trustedx
export PUERTO=38080 o 38081
ms-list-certificate/src/main/java/co/com/certicamara/servicio/SoapClienteServicio.java
View file @
1cfd70ab
...
@@ -7,21 +7,18 @@ import org.springframework.http.HttpStatus;
...
@@ -7,21 +7,18 @@ import org.springframework.http.HttpStatus;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
import
org.apache.log4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
co.com.certicamara.dto.EntidadSolicitudDto
;
import
co.com.certicamara.dto.EntidadSolicitudDto
;
import
co.com.certicamara.utils.UtilsXML
;
import
co.com.certicamara.utils.UtilsXML
;
import
javax.net.ssl.HostnameVerifier
;
import
javax.net.ssl.HttpsURLConnection
;
import
javax.net.ssl.SSLSession
;
@Service
@Service
public
class
SoapClienteServicio
{
public
class
SoapClienteServicio
{
private
final
Logger
logger
=
Logger
.
getLogger
(
this
.
getClass
());
private
final
Logger
logger
=
Logger
Factory
.
getLogger
(
this
.
getClass
());
@Value
(
"${HOST_TRUSTED}"
)
@Value
(
"${HOST_TRUSTED}"
)
private
String
host
;
private
String
host
;
...
...
ms-list-certificate/src/main/java/co/com/certicamara/servicio/TrustedServicio.java
View file @
1cfd70ab
package
co
.
com
.
certicamara
.
servicio
;
package
co
.
com
.
certicamara
.
servicio
;
import
org.apache.log4j.Logger
;
import
org.apache.tomcat.util.codec.binary.Base64
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -17,7 +19,6 @@ import javax.xml.bind.JAXBContext;
...
@@ -17,7 +19,6 @@ import javax.xml.bind.JAXBContext;
import
javax.xml.bind.Unmarshaller
;
import
javax.xml.bind.Unmarshaller
;
import
java.io.*
;
import
java.io.*
;
import
org.apache.commons.codec.binary.Base64
;
import
java.io.ByteArrayInputStream
;
import
java.io.ByteArrayInputStream
;
import
java.math.BigInteger
;
import
java.math.BigInteger
;
import
java.security.Principal
;
import
java.security.Principal
;
...
@@ -33,7 +34,7 @@ import java.util.Map;
...
@@ -33,7 +34,7 @@ import java.util.Map;
@Service
@Service
public
class
TrustedServicio
{
public
class
TrustedServicio
{
private
final
Logger
logger
=
Logger
.
getLogger
(
this
.
getClass
());
private
final
Logger
logger
=
Logger
Factory
.
getLogger
(
this
.
getClass
());
@Autowired
@Autowired
private
SoapClienteServicio
soapClienteServicio
;
private
SoapClienteServicio
soapClienteServicio
;
...
...
ms-list-certificate/src/main/java/co/com/certicamara/utils/UtilsXML.java
View file @
1cfd70ab
package
co
.
com
.
certicamara
.
utils
;
package
co
.
com
.
certicamara
.
utils
;
import
org.apache.log4j.Logger
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
org.w3c.dom.Document
;
import
org.w3c.dom.Document
;
import
org.w3c.dom.Element
;
import
org.w3c.dom.Element
;
...
@@ -14,11 +14,13 @@ import javax.xml.transform.TransformerFactory;
...
@@ -14,11 +14,13 @@ import javax.xml.transform.TransformerFactory;
import
javax.xml.transform.dom.DOMSource
;
import
javax.xml.transform.dom.DOMSource
;
import
javax.xml.transform.stream.StreamResult
;
import
javax.xml.transform.stream.StreamResult
;
import
java.io.StringWriter
;
import
java.io.StringWriter
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
@Component
@Component
public
class
UtilsXML
{
public
class
UtilsXML
{
private
final
Logger
logger
=
Logger
.
getLogger
(
this
.
getClass
());
private
final
Logger
logger
=
Logger
Factory
.
getLogger
(
this
.
getClass
());
public
String
generarSoapCertificados
(
String
username
,
String
password
,
String
nuip
)
public
String
generarSoapCertificados
(
String
username
,
String
password
,
String
nuip
)
throws
ParserConfigurationException
{
throws
ParserConfigurationException
{
...
...
ms-list-certificate/src/main/resources/log4j.properties
deleted
100644 → 0
View file @
314103e2
# Root logger option
log4j.rootLogger
=
INFO, stdout, file
# Redirect log messages to console
log4j.appender.stdout
=
org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target
=
System.out
log4j.appender.stdout.layout
=
org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern
=
%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
# Redirect log messages to a log file, support file rolling.
log4j.appender.file
=
org.apache.log4j.DailyRollingFileAppender
log4j.appender.file.DatePattern
=
'.'yyyy-MM-dd
log4j.appender.file.File
=
../logs/ms_list_certificate.log
>>>>>>>
logs
log4j.appender.file.layout
=
org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern
=
%d{yyyy-MM-dd HH:mm:ss} %-5p %c{1}:%L - %m%n
ms-list-certificate/src/main/resources/logback.xml
0 → 100644
View file @
1cfd70ab
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender
name=
"console"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<encoder>
<pattern>
%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<appender
name=
"file"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<file>
../logs/Ms-list-certificate.log
</file>
<rollingPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"
>
<fileNamePattern>
../logs/Ms-list-certificate-%d{yyyy-MM-dd}.%i.log.gz
</fileNamePattern>
<maxFileSize>
10MB
</maxFileSize>
<!-- Tamaño máximo del archivo antes de rotar -->
<!-- <maxHistory>10</maxHistory> Número máximo de archivos de registro a mantener -->
<!-- <totalSizeCap>1GB</totalSizeCap> Tamaño total máximo de todos los archivos de registro -->
</rollingPolicy>
<encoder>
<pattern>
%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
</pattern>
</encoder>
</appender>
<root
level=
"info"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"file"
/>
</root>
</configuration>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment