Skip to content

Commit 83d1b8b

Browse files
authored
Merge pull request #59 from oracle/Issue#57-Add-alias-JSON-file-for-Log
Added a alias JSON file for Log as a root folder
2 parents 4a53599 + 131fc0b commit 83d1b8b

File tree

4 files changed

+73
-0
lines changed

4 files changed

+73
-0
lines changed

core/src/main/python/wlsdeploy/aliases/alias_entries.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ class AliasEntries(object):
8080
'JMX': 'JMX',
8181
'JTA': 'JTA',
8282
'Library': 'Library',
83+
'Log': 'Log',
8384
'Machine': 'Machine',
8485
'MailSession': 'MailSession',
8586
'MessagingBridge': 'MessagingBridge',
@@ -110,6 +111,7 @@ class AliasEntries(object):
110111
'Cluster',
111112
'JMX',
112113
'JTA',
114+
'Log',
113115
'Machine',
114116
'MigratableTarget',
115117
"RestfulManagementServices",

core/src/main/python/wlsdeploy/aliases/model_constants.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@
131131
LDAP_X509_IDENTITY_ASSERTER = 'LDAPX509IdentityAsserter'
132132
LIBRARY = 'Library'
133133
LOAD_BALANCING_PARAMS = 'LoadBalancingParams'
134+
LOG = 'Log'
134135
LOG_ACTION = 'LogAction'
135136
MACHINE = 'Machine'
136137
MAIL_SESSION = 'MailSession'
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
{
2+
"copyright": "Copyright (c) 2017, 2018, Oracle and/or its affiliates. All rights reserved.",
3+
"license": "The Universal Permissive License (UPL), Version 1.0",
4+
"wlst_type": "Log",
5+
"child_folders_type": "single_unpredictable",
6+
"default_name_value": "${NO_NAME_0:%DOMAIN%}",
7+
"folders": {},
8+
"attributes": {
9+
"BufferSizeKb": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "BufferSizeK${b:B}", "wlst_path": "WP001", "value": {"default": 8 }, "wlst_type": "integer"} ],
10+
"DateFormatPattern": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DateFormatPattern", "wlst_path": "WP001", "value": {"default": "MMM d, yyyy, h:mm:ss,S a z" }, "wlst_type": "string" } ],
11+
"DomainLogBroadcastFilter": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DomainLogBroadcastFilter", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
12+
"DomainLogBroadcastSeverity": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DomainLogBroadcastSeverity", "wlst_path": "WP001", "value": {"default": "Notice"}, "wlst_type": "string" } ],
13+
"DomainLogBroadcasterBufferSize": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "DomainLogBroadcasterBufferSize", "wlst_path": "WP001", "value": {"default": 1 }, "wlst_type": "integer"} ],
14+
"DynamicallyCreated": [ {"version": "[10,)", "wlst_mode": "online", "wlst_name": "DynamicallyCreated", "wlst_path": "WP001", "value": {"default": false }, "wlst_type": "boolean", "access": "RO"} ],
15+
"FileCount": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "FileCount", "wlst_path": "WP001", "value": {"default": 7 }, "wlst_type": "integer"} ],
16+
"FileMinSize": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "FileMinSize", "wlst_path": "WP001", "value": {"default": 500 }, "wlst_type": "integer"} ],
17+
"FileName": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "FileName", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
18+
"FileTimeSpan": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "FileTimeSpan", "wlst_path": "WP001", "value": {"default": 24 }, "wlst_type": "integer"} ],
19+
"FileTimeSpanFactor": [ {"version": "[10,)", "wlst_mode": "offline", "wlst_name": "FileTimeSpanFactor", "wlst_path": "WP001", "value": {"default": 3600000 }, "wlst_type": "long" } ],
20+
"Log4jLoggingEnabled": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "Log4jLoggingEnabled", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean"} ],
21+
"LogFileFilter": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "LogFileFilter", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
22+
"LogFileRotationDir": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "LogFileRotationDir", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
23+
"LogFileSeverity": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "LogFileSeverity", "wlst_path": "WP001", "value": {"default": "Trace" }, "wlst_type": "string" } ],
24+
"LogMonitoringEnabled": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "LogMonitoringEnabled", "wlst_path": "WP001", "value": {"default": "true" }, "wlst_type": "string" } ],
25+
"LogMonitoringIntervalSecs": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "LogMonitoringIntervalSecs", "wlst_path": "WP001", "value": {"default": 30 }, "wlst_type": "integer"} ],
26+
"LogMonitoringMaxThrottleMessageSignatureCount": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "LogMonitoringMaxThrottleMessageSignatureCount", "wlst_path": "WP001", "value": {"default": 1000 }, "wlst_type": "integer"} ],
27+
"LogMonitoringThrottleMessageLength": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "LogMonitoringThrottleMessageLength", "wlst_path": "WP001", "value": {"default": 50 }, "wlst_type": "integer"} ],
28+
"LogMonitoringThrottleThreshold": [ {"version": "[12.2.1,)", "wlst_mode": "both", "wlst_name": "LogMonitoringThrottleThreshold", "wlst_path": "WP001", "value": {"default": 1500 }, "wlst_type": "integer"} ],
29+
"LoggerSeverity": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "LoggerSeverity", "wlst_path": "WP001", "value": {"default": "Info" }, "wlst_type": "string" } ],
30+
"LoggerSeverityProperties": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "LoggerSeverityProperties", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
31+
"MemoryBufferFilter": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "MemoryBufferFilter", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
32+
"MemoryBufferSeverity": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "MemoryBufferSeverity", "wlst_path": "WP001", "value": {"default": "Trace" }, "wlst_type": "string" } ],
33+
"MemoryBufferSize": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "MemoryBufferSize", "wlst_path": "WP001", "value": {"default": 10 }, "wlst_type": "integer"} ],
34+
"Notes": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "Notes", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
35+
"NumberOfFilesLimited": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "NumberOfFilesLimited", "wlst_path": "WP001", "value": {"default": "true" }, "wlst_type": "boolean"} ],
36+
"PlatformLoggerLevels": [ {"version": "[12.1.3,)", "wlst_mode": "both", "wlst_name": "PlatformLoggerLevels", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
37+
"RedirectStderrToServerLogEnabled": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "RedirectStderrToServerLogEnabled", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean"} ],
38+
"RedirectStdoutToServerLogEnabled": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "RedirectStdoutToServerLogEnabled", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean"} ],
39+
"RotateLogOnStartup": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "RotateLogOnStartup", "wlst_path": "WP001", "value": {"default": "true" }, "wlst_type": "boolean"} ],
40+
"RotationTime": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "RotationTime", "wlst_path": "WP001", "value": {"default": "00:00" }, "wlst_type": "string" } ],
41+
"RotationType": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "RotationType", "wlst_path": "WP001", "value": {"default": "bySize"}, "wlst_type": "string" } ],
42+
"ServerLoggingBridgeAtRootLoggerEnabled": [ {"version": "[10,)", "wlst_mode": "offline", "wlst_name": "ServerLoggingBridgeAtRootLoggerEnabled", "wlst_path": "WP001", "value": {"default": "true" }, "wlst_type": "boolean"} ],
43+
"ServerLoggingBridgeUseParentLoggersEnabled": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "ServerLoggingBridgeUseParentLoggersEnabled", "wlst_path": "WP001", "value": {"default": "false" }, "wlst_type": "boolean"} ],
44+
"StacktraceDepth": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "StacktraceDepth", "wlst_path": "WP001", "value": {"default": 5 }, "wlst_type": "integer"} ],
45+
"StdoutFilter": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "StdoutFilter", "wlst_path": "WP001", "value": {"default": "None" }, "wlst_type": "string" } ],
46+
"StdoutFormat": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "StdoutFormat", "wlst_path": "WP001", "value": {"default": "standard"}, "wlst_type": "string" } ],
47+
"StdoutLogStack": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "StdoutLogStack", "wlst_path": "WP001", "value": {"default": "true" }, "wlst_type": "boolean"} ],
48+
"StdoutSeverity": [ {"version": "[10,)", "wlst_mode": "both", "wlst_name": "StdoutSeverity", "wlst_path": "WP001", "value": {"default": "Notice"}, "wlst_type": "string" } ]
49+
},
50+
"wlst_attributes_path": "WP001",
51+
"wlst_paths": {
52+
"WP001": "/Log/%LOG%"
53+
}
54+
}
55+

core/src/test/python/aliases_test.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,6 +1130,21 @@ def testIssue50Fix(self):
11301130

11311131
return
11321132

1133+
def testIssue57Fix(self):
1134+
location = LocationContext().append_location(FOLDERS.LOG)
1135+
token = self.aliases.get_name_token(location)
1136+
location.add_name_token(token, 'DemoDomain')
1137+
1138+
expected = 'true'
1139+
default_value = self.aliases.get_model_attribute_default_value(location, 'RotateLogOnStartup')
1140+
self.assertEqual(default_value, expected)
1141+
1142+
expected = 'true'
1143+
default_value = self.online_aliases.get_model_attribute_default_value(location, 'RotateLogOnStartup')
1144+
self.assertEqual(default_value, expected)
1145+
1146+
return
1147+
11331148
def testGetModelAttributeName(self):
11341149
location=LocationContext().append_location(FOLDERS.JMS_SYSTEM_RESOURCE)
11351150
token = self.aliases.get_name_token(location)

0 commit comments

Comments
 (0)