Skip to content

Instantly share code, notes, and snippets.

@hansbogert
Last active February 1, 2018 17:34
Show Gist options
  • Save hansbogert/d7d2f57ccf8c7e2502ec4df9a3cf21f3 to your computer and use it in GitHub Desktop.
Save hansbogert/d7d2f57ccf8c7e2502ec4df9a3cf21f3 to your computer and use it in GitHub Desktop.

Revisions

  1. hansbogert revised this gist Feb 1, 2018. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion symfony3wip.pattern
    Original file line number Diff line number Diff line change
    @@ -2,7 +2,7 @@ VERYGREEDYDATA (.|\n)*

    SYMFONY_EXCEPTION [^:]*

    SYMFONY_LOG_TYPE request|security|app|profiler|doctrine|event|budget
    SYMFONY_LOG_TYPE request|security|app|profiler|doctrine|event|budget|%{WORD}
    SYMFONY_LOG_LEVEL DEBUG|INFO|WARNING|ERROR|CRITICAL|ALERT
    SYMFONY_LOG %{SYMFONY_LOG_TYPE:log_type}\.%{SYMFONY_LOG_LEVEL:log_level}

  2. hansbogert revised this gist Jan 30, 2018. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions symfony3wip.pattern
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    VERYGREEDYDATA (.)*
    VERYGREEDYDATA (.|\n)*

    SYMFONY_EXCEPTION [^:]*

    @@ -13,7 +13,7 @@ SYMFONY_REQUEST_METHOD GET|POST|PUT|DELETE|HEAD|OPTIONS|CONNECT
    SYMFONY_REQUEST_PARAMETERS {"url":"%{GREEDYDATA:request_url}","ip":"%{IP:request_ip}","http_method":"%{SYMFONY_REQUEST_METHOD:request_method}"}

    SYMFONY_REQUEST_INFO Matched route "%{GREEDYDATA:route}"\. %{GREEDYDATA:route_params}
    SYMFONY_REQUEST_UNCAUGHT_EXCEPTION Uncaught PHP Exception %{SYMFONY_EXCEPTION:exception}: "%{VERYGREEDYDATA:exception_message}" at %{VERYGREEDYDATA:exception_file} line %{NUMBER:exception_file_line} %{GREEDYDATA:exception_json}
    SYMFONY_REQUEST_UNCAUGHT_EXCEPTION Uncaught PHP Exception %{SYMFONY_EXCEPTION:exception}: "%{GREEDYDATA:exception_message}" at %{GREEDYDATA:exception_file} line %{NUMBER:exception_file_line} %{GREEDYDATA:exception_json}
    SYMFONY_REQUEST_UNCAUGHT_EXCEPTION_OLD %{SYMFONY_EXCEPTION:exception}: %{VERYGREEDYDATA:exception_message} \(uncaught exception\) at %{VERYGREEDYDATA:exception_file} line %{NUMBER:exception_file_line}
    SYMFONY_REQUEST_CRITICAL Exception thrown when handling an exception \(ErrorException: %{GREEDYDATA:exception_message} in %{GREEDYDATA:exception_file} line %{NUMBER:exception_file_line}\)
    SYMFONY_SECURITY_WARNING_USER_MISSING Username "%{GREEDYDATA:user}" could not be found.
  3. hansbogert revised this gist Jan 30, 2018. 1 changed file with 3 additions and 2 deletions.
    5 changes: 3 additions & 2 deletions symfony3wip.pattern
    Original file line number Diff line number Diff line change
    @@ -1,4 +1,4 @@
    VERYGREEDYDATA (.|\n)*
    VERYGREEDYDATA (.)*

    SYMFONY_EXCEPTION [^:]*

    @@ -13,7 +13,8 @@ SYMFONY_REQUEST_METHOD GET|POST|PUT|DELETE|HEAD|OPTIONS|CONNECT
    SYMFONY_REQUEST_PARAMETERS {"url":"%{GREEDYDATA:request_url}","ip":"%{IP:request_ip}","http_method":"%{SYMFONY_REQUEST_METHOD:request_method}"}

    SYMFONY_REQUEST_INFO Matched route "%{GREEDYDATA:route}"\. %{GREEDYDATA:route_params}
    SYMFONY_REQUEST_UNCAUGHT_EXCEPTION %{SYMFONY_EXCEPTION:exception}: %{VERYGREEDYDATA:exception_message} \(uncaught exception\) at %{VERYGREEDYDATA:exception_file} line %{NUMBER:exception_file_line}
    SYMFONY_REQUEST_UNCAUGHT_EXCEPTION Uncaught PHP Exception %{SYMFONY_EXCEPTION:exception}: "%{VERYGREEDYDATA:exception_message}" at %{VERYGREEDYDATA:exception_file} line %{NUMBER:exception_file_line} %{GREEDYDATA:exception_json}
    SYMFONY_REQUEST_UNCAUGHT_EXCEPTION_OLD %{SYMFONY_EXCEPTION:exception}: %{VERYGREEDYDATA:exception_message} \(uncaught exception\) at %{VERYGREEDYDATA:exception_file} line %{NUMBER:exception_file_line}
    SYMFONY_REQUEST_CRITICAL Exception thrown when handling an exception \(ErrorException: %{GREEDYDATA:exception_message} in %{GREEDYDATA:exception_file} line %{NUMBER:exception_file_line}\)
    SYMFONY_SECURITY_WARNING_USER_MISSING Username "%{GREEDYDATA:user}" could not be found.
    SYMFONY_SECURITY_INFO_USER_AUTHENTICATED User "%{GREEDYDATA:user}" has been authenticated successfully
  4. hansbogert created this gist Jan 30, 2018.
    34 changes: 34 additions & 0 deletions symfony3wip.pattern
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,34 @@
    VERYGREEDYDATA (.|\n)*

    SYMFONY_EXCEPTION [^:]*

    SYMFONY_LOG_TYPE request|security|app|profiler|doctrine|event|budget
    SYMFONY_LOG_LEVEL DEBUG|INFO|WARNING|ERROR|CRITICAL|ALERT
    SYMFONY_LOG %{SYMFONY_LOG_TYPE:log_type}\.%{SYMFONY_LOG_LEVEL:log_level}

    SYMFONY_PARAMETER "[^"]*":( )?"[^"]*"
    SYMFONY_PARAMETERS (%{SYMFONY_PARAMETER}(, )?)*
    SYMFONY_CONTEXT {.*}
    SYMFONY_REQUEST_METHOD GET|POST|PUT|DELETE|HEAD|OPTIONS|CONNECT
    SYMFONY_REQUEST_PARAMETERS {"url":"%{GREEDYDATA:request_url}","ip":"%{IP:request_ip}","http_method":"%{SYMFONY_REQUEST_METHOD:request_method}"}

    SYMFONY_REQUEST_INFO Matched route "%{GREEDYDATA:route}"\. %{GREEDYDATA:route_params}
    SYMFONY_REQUEST_UNCAUGHT_EXCEPTION %{SYMFONY_EXCEPTION:exception}: %{VERYGREEDYDATA:exception_message} \(uncaught exception\) at %{VERYGREEDYDATA:exception_file} line %{NUMBER:exception_file_line}
    SYMFONY_REQUEST_CRITICAL Exception thrown when handling an exception \(ErrorException: %{GREEDYDATA:exception_message} in %{GREEDYDATA:exception_file} line %{NUMBER:exception_file_line}\)
    SYMFONY_SECURITY_WARNING_USER_MISSING Username "%{GREEDYDATA:user}" could not be found.
    SYMFONY_SECURITY_INFO_USER_AUTHENTICATED User "%{GREEDYDATA:user}" has been authenticated successfully
    SYMFONY_SECURITY_INFO_AUTHENTICATION_FAILED Authentication request failed: %{GREEDYDATA:authentication_fail_reason}
    SYMFONY_SECURITY_DEBUG Username "%{GREEDYDATA:user}" was reloaded from user provider.
    SYMFONY_EVENT_DEBUG_NOTIFICATION Notified event "%{GREEDYDATA:event}" to listener "%{GREEDYDATA:listener}".
    SYMFONY_EVENT_DEBUG_PROPAGATION_STOP Listener "%{GREEDYDATA:listener}" stopped propagation of the event "%{GREEDYDATA:event}".
    SYMFONY_DOCTRINE_DEBUG (?<=doctrine.DEBUG: ).*

    SYMFONY_REQUEST %{SYMFONY_REQUEST_INFO}|%{SYMFONY_REQUEST_UNCAUGHT_EXCEPTION}|%{SYMFONY_REQUEST_CRITICAL}
    SYMFONY_SECURITY %{SYMFONY_SECURITY_WARNING_USER_MISSING}|%{SYMFONY_SECURITY_INFO_USER_AUTHENTICATED}|%{SYMFONY_SECURITY_DEBUG}|%{SYMFONY_SECURITY_INFO_AUTHENTICATION_FAILED}
    SYMFONY_EVENT %{SYMFONY_EVENT_DEBUG_NOTIFICATION}|%{SYMFONY_EVENT_DEBUG_PROPAGATION_STOP}
    SYMFONY_DOCTRINE %{SYMFONY_DOCTRINE_DEBUG:doctrine_sql_query}
    SYMFONY_VARIOUS_INFO Write SecurityContext in the session|Reloading user from user provider.|Read SecurityContext from the session|Populated SecurityContext with an anonymous Token|Access is denied (and user is neither anonymous, nor remember-me)|Unable to store the profiler information.|Remember-me cookie accepted.

    SYMFONY_LOG_MESSAGE %{SYMFONY_REQUEST}|%{SYMFONY_SECURITY}|%{SYMFONY_EVENT}|%{SYMFONY_DOCTRINE}|%{SYMFONY_VARIOUS_INFO:log_various_info}|%{VERYGREEDYDATA:log_unparsed_message}

    SYMFONY ^\[%{TIMESTAMP_ISO8601:date}\] %{SYMFONY_LOG}: %{SYMFONY_LOG_MESSAGE:log_message}