[Tutor] How to create a structure from a Log file

Mark Lawrence breamoreboy at gmail.com
Sat Mar 9 19:53:28 EST 2019


On 09/03/2019 18:44, Asad wrote:
> Hi All ,
> 
>           Please a sample logfile
> 
> [main] [ 2019-01-21 10:13:14.041 CET ]
> [AssistantLogHandler.configureLogging:176]  Begin tracing..
> INFO: Jan 21, 2019 10:13:14 AM oracle.assistants.dbua.driver.UpgradeDriver
> configureLogging
> INFO: Loading upgrade driver,
>   DBUA running in mode : NONE
>   DBUA running on platform : Linux
> 
> 
> [main] [ 2019-01-21 10:13:14.237 CET ]
> [ClusterVerification.getInstance:553]  Method Entry. workDir=/tmp
> frameworkHome=/u01/app/oracle/product/12.2.0.1/dbhome_1
> [main] [ 2019-01-21 10:13:14.289 CET ] [CVUVariables.initialize:1456]
> Start parse all variables from variables.xml...
> [main] [ 2019-01-21 10:13:14.304 CET ]
> [VerificationUtil.getVariablesXmlURI:10687]  ====  XML variables file:
> file:/u01/app/oracle/product/12.2.0.1/dbhome_1/cv/cvdata/variables.xml
> [main] [ 2019-01-21 10:13:14.305 CET ]
> [VerificationUtil.getVariablesXmlSchemaURI:10669]  ==== XML variables
> schema file: file:/u01/app/oracle/product/
> 12.2.0.1/dbhome_1/cv/cvdata/variables.xsd
> [main] [ 2019-01-21 10:13:14.305 CET ] [CVUVariables.getRootElement:1721]
> ==== URIs obtained :xsd URI = file:/u01/app/oracle/product/
> 12.2.0.1/dbhome_1/cv/cvdata/variables.xsd
> [main] [ 2019-01-21 10:13:14.306 CET ] [CVUVariables.getRootElement:1722]
> ==== URIs obtained :xml URI = file:/u01/app/oracle/product/
> 12.2.0.1/dbhome_1/cv/cvdata/variables.xml
> [main] [ 2019-01-21 10:13:14.306 CET ] [CVUVariables.getRootElement:1735]
> xsdFile exists : file:/u01/app/oracle/product/
> 12.2.0.1/dbhome_1/cv/cvdata/variables.xsd
> [main] [ 2019-01-21 10:13:14.307 CET ] [CVUVariables.getRootElement:1750]
> xmlFile exists : file:/u01/app/oracle/product/
> 12.2.0.1/dbhome_1/cv/cvdata/variables.xml
> [main] [ 2019-01-21 10:13:14.307 CET ] [CVUVariables.getRootElement:1763]
> setting xmlFactory to use xsdFile : file:/u01/app/oracle/product/
> 12.2.0.1/dbhome_1/cv/cvdata/variables.xsd
> [main] [ 2019-01-21 10:13:14.408 CET ] [CVUVariables.getRootElement:1794]
> The xml variables file: file:/u01/app/oracle/product/
> 12.2.0.1/dbhome_1/cv/cvdata/variables.xml, was parsed correctly
> [main] [ 2019-01-21 10:13:14.410 CET ] [CVUVariables.parse:1521]  Version
> found ALL
> [main] [ 2019-01-21 10:13:14.411 CET ] [CVUVariables.parse:1524]  Process
> common variables
> [main] [ 2019-01-21 10:13:14.415 CET ] [CVUVariableData.<init>:98]
> CVUVariableData created with names:  "s_silent,SILENT"
> [main] [ 2019-01-21 10:13:14.416 CET ] [CVUVariables.parse:1521]  Version
> found 12.2
> [main] [ 2019-01-21 10:13:14.416 CET ] [CVUVariables.parse:1529]  Process
> variables for the release: 12.2
> [main] [ 2019-01-21 10:13:14.418 CET ] [CVUVariableData.<init>:98]
> CVUVariableData created with names:
> 
> 
> I was thinking to convert it in a excel format  or any other format which
> better viewable
> 
> Thanks,

I suggest that you start with this 
https://docs.python.org/3/library/stdtypes.html#string-methods to grab 
your data.  Then how about https://docs.python.org/3/library/csv.html 
for writing your data.  Should this not be adequate please let us know 
and we'll get you sorted :)

-- 
My fellow Pythonistas, ask not what our language can do for you, ask
what you can do for our language.

Mark Lawrence



More information about the Tutor mailing list