def rule(event):
    if all(
        [
            "\\Tomcat" in event.deep_get("TargetFilename", default=""),
            "\\logs\\" in event.deep_get("TargetFilename", default=""),
            any(
                [
                    "catalina." in event.deep_get("TargetFilename", default=""),
                    "_access_log." in event.deep_get("TargetFilename", default=""),
                    "localhost." in event.deep_get("TargetFilename", default=""),
                ]
            ),
        ]
    ):
        return True
    return False
