Eu escrevi um script bash para analisar o conteúdo do arquivo abaixo, mas está demorando muito tempo. Existe algum awk ou sed ou perl pode ser usado aqui.
Conteúdo do arquivo de log:
DEBUG 9/21/16 9:37 AM: liquibase: Running Changeset:c:/git/test_changelog.xml::create_table1::user_name
DEBUG 9/21/16 9:37 AM: liquibase: Changeset c:/git/test_changelog.xml::create_table1::user_name
DEBUG 9/21/16 9:37 AM: liquibase: Creating table1
DEBUG 9/21/16 9:37 AM: liquibase: Reading ChangeSet: c:/git/test_changelog.xml::create_table1::user_name
DEBUG 9/21/16 9:37 AM: liquibase: Executing Statement: CREATE table dd1
addd column col1 number
DEBUG 9/21/16 9:37 AM: liquibase: Executing EXECUTE database command: CREATE table dd1
addd column col1 number
DEBUG 9/21/16 9:37 AM: liquibase: Executing Statement: CREATE OR REPLACE PUBLIC SYNONYM dd1 for dd1
DEBUG 9/21/16 9:37 AM: liquibase: Executing EXECUTE database command: CREATE OR REPLACE PUBLIC SYNONYM dd1 for dd1
DEBUG 9/21/16 9:37 AM: liquibase: Executing Statement: GRANT EXECUTE ON dd1 TO user1;
GRANT EXECUTE ON dd1 TO user2;
DEBUG 9/21/16 9:37 AM: liquibase: Executing EXECUTE database command: GRANT EXECUTE ON dd1 TO user1;
GRANT EXECUTE ON dd1 TO user2;
INFO 9/21/16 9:37 AM: liquibase: SQL in file ../../schema/xyz/types/tables_file.tbl executed
INFO 9/21/16 9:37 AM: liquibase: ChangeSet c:/git/test_changelog.xml::create_table1::user_name ran successfully in 56ms
DEBUG 9/21/16 9:37 AM: liquibase: Running Changeset:c:/git/test_changelog.xml::create_table2::user_name
DEBUG 9/21/16 9:37 AM: liquibase: Changeset c:/git/test_changelog.xml::create_table2::user_name
DEBUG 9/21/16 9:37 AM: liquibase: Creating table1
DEBUG 9/21/16 9:37 AM: liquibase: Reading ChangeSet: c:/git/test_changelog.xml::create_table2::user_name
DEBUG 9/21/16 9:37 AM: liquibase: Executing Statement: CREATE table dd2
addd column col1 number
DEBUG 9/21/16 9:37 AM: liquibase: Executing EXECUTE database command: CREATE table dd2
addd column col1 number
DEBUG 9/21/16 9:37 AM: liquibase: Executing Statement: CREATE OR REPLACE PUBLIC SYNONYM dd2 for dd2
DEBUG 9/21/16 9:37 AM: liquibase: Executing EXECUTE database command: CREATE OR REPLACE PUBLIC SYNONYM dd2 for dd2
DEBUG 9/21/16 9:37 AM: liquibase: Executing Statement: GRANT EXECUTE ON dd2 TO user1;
GRANT EXECUTE ON dd2 TO user2;
DEBUG 9/21/16 9:37 AM: liquibase: Executing EXECUTE database command: GRANT EXECUTE ON dd2 TO user1;
GRANT EXECUTE ON dd2 TO user2;
INFO 9/21/16 9:37 AM: liquibase: SQL in file ../../schema/xyz/types/tables_file2.tbl executed
INFO 9/21/16 9:37 AM: liquibase: ChangeSet c:/git/test_changelog.xml::create_table2::user_name ran successfully in 86ms
O resultado deve ser:
Running Changeset:c:/git/test_changelog.xml::create_table1::user_name
Executing EXECUTE database command: CREATE table dd1
addd column col1 number
Executing EXECUTE database command: CREATE OR REPLACE PUBLIC SYNONYM dd1 for dd1
Executing EXECUTE database command: GRANT EXECUTE ON dd1 TO user1;
GRANT EXECUTE ON dd1 TO user2;
SQL in file ../../schema/xyz/types/tables_file.tbl executed
ChangeSet c:/git/test_changelog.xml::create_table1::user_name ran successfully in 56ms
Running Changeset:c:/git/test_changelog.xml::create_table2::user_name
Executing EXECUTE database command: CREATE table dd2
addd column col1 number
Executing EXECUTE database command: CREATE OR REPLACE PUBLIC SYNONYM dd2 for dd2
Executing EXECUTE database command: GRANT EXECUTE ON dd2 TO user1;
GRANT EXECUTE ON dd2 TO user2;
SQL in file ../../schema/xyz/types/tables_file2.tbl executed
ChangeSet c:/git/test_changelog.xml::create_table2::user_name ran successfully in 86ms
Tags text-processing awk