Skip to content

Commit fea3069

Browse files
author
Chad Horohoe
committed
Add simple subcommand for logging to server admin log
Summary: Sometimes it's annoying to context switch back to IRC. Also, there's been some talk about removing the IRC dependency for logging, so this would provide a useful fallback Test Plan: Tyler tested it, not me Reviewers: mmodell, #release-engineering-team, thcipriani Reviewed By: #release-engineering-team, thcipriani Subscribers: thcipriani Tags: #release-engineering-team Differential Revision: https://phabricator.wikimedia.org/D567
1 parent 292d89e commit fea3069

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

Diff for: scap/__init__.py

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
RebuildCdbs,
1616
RefreshCdbJsonFiles,
1717
RestartHHVM,
18+
ServerAdminLog,
1819
Scap,
1920
SecurityPatchCheck,
2021
SyncCommon,
@@ -43,6 +44,7 @@
4344
'RebuildCdbs',
4445
'RefreshCdbJsonFiles',
4546
'RestartHHVM',
47+
'ServerAdminLog',
4648
'Scap',
4749
'SecurityPatchCheck',
4850
'SyncCommon',
@@ -72,6 +74,7 @@ def all_applications():
7274
MWVersionsInUse,
7375
RebuildCdbs,
7476
RefreshCdbJsonFiles,
77+
ServerAdminLog,
7578
RestartHHVM,
7679
Scap,
7780
SecurityPatchCheck,

Diff for: scap/main.py

+12
Original file line numberDiff line numberDiff line change
@@ -802,3 +802,15 @@ def main(self, *extra_args):
802802
os.mkdir(upstream_dir)
803803

804804
tasks.refresh_cdb_json_files(cdb_dir, use_cores, self.verbose)
805+
806+
807+
@cli.command('log')
808+
@cli.command('sal')
809+
class ServerAdminLog(cli.Application):
810+
"""
811+
Send an entry to the server admin log
812+
"""
813+
814+
@cli.argument('message', nargs='*', help='Log message for SAL')
815+
def main(self, *extra_args):
816+
self.announce(self.arguments.message)

0 commit comments

Comments
 (0)