Merge lp:~vishvananda/nova/remove-syslog-workaround into lp:~hudson-openstack/nova/trunk

Proposed by Vish Ishaya
Status: Merged
Approved by: Vish Ishaya
Approved revision: 229
Merged at revision: 234
Proposed branch: lp:~vishvananda/nova/remove-syslog-workaround
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 20 lines (+1/-9)
1 file modified
nova/twistd.py (+1/-9)
To merge this branch: bzr merge lp:~vishvananda/nova/remove-syslog-workaround
Reviewer Review Type Date Requested Status
Manish Singh (community) Approve
Jesse Andrews (community) Approve
Review via email: mp+32649@code.launchpad.net

Commit message

Removes the workaround for syslog-ng of removing newlines.

Description of the change

Removes the workaround for syslog-ng of removing newlines. Apparently twisted's syslogging features actually log things with newlines correctly and the workaround isn't needed.

To post a comment you must log in.
Revision history for this message
Jesse Andrews (anotherjesse) wrote :

lgtm

review: Approve
Revision history for this message
Manish Singh (yosh-gimp) wrote :

lgtm

review: Approve
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :
Download full text (11.1 KiB)

The attempt to merge lp:~vishvananda/nova/remove-syslog-workaround into lp:nova failed.Below is the output from the failed tests.

nova.tests.access_unittest
  AccessTestCase
    test_001_allow_all ... [OK]
    test_002_allow_none ... [OK]
    test_003_allow_project_manager ... [OK]
    test_004_allow_sys_and_net ... [OK]
    test_005_allow_sys_no_pm ... [OK]
nova.tests.api_unittest
  ApiEc2TestCase
    test_describe_instances ... [OK]
    test_get_all_key_pairs ... [OK]
nova.tests.auth_unittest
  AuthTestCase
    test_001_can_create_users ... [OK]
    test_002_can_get_user ... [OK]
    test_003_can_retreive_properties ... [OK]
    test_004_signature_is_valid ... [OK]
    test_005_can_get_credentials ... [OK]
    test_006_test_key_storage ... [OK]
    test_007_test_key_generation ... [OK]
    test_008_can_list_key_pairs ... [OK]
    test_009_can_delete_key_pair ... [OK]
    test_010_can_list_users ... [OK]
    test_101_can_add_user_role ... [OK]
    test_199_can_remove_user_role ... [OK]
    test_201_can_create_project ... [OK]
    test_202_user1_is_project_member ... [OK]
    test_203_user2_is_not_project_member ... [OK]
    test_204_user1_is_project_manager ... [OK]
    test_205_user2_is_not_project_manager ... [OK]
    test_206_can_add_user_to_project ... [OK]
    test_207_can_remove_user_from_project ... [OK]
    test_208_can_remove_add_user_with_role ... [OK]
    test_209_can_generate_x509 ... [OK]
    test_210_can_add_project_role ... [OK]
    test_211_can_list_project_roles ... [OK]
    test_212_can_remove_project_role ... [OK]
    test_214_can_retrieve_project_by_user ... [OK]
    test_299_can_delete_project ... [OK]
    test_999_can_delete_users ... [OK]
nova.tests.cloud_unittest
  CloudTestCase
    test_console_output ... [OK]
    test_instance_update_state ... [OK]
    test_run_instances...

Revision history for this message
Vish Ishaya (vishvananda) wrote :

Hmm this is a strange intermittent error. I'm attempting to submit again.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nova/twistd.py'
2--- nova/twistd.py 2010-07-30 18:29:13 +0000
3+++ nova/twistd.py 2010-08-14 00:05:55 +0000
4@@ -241,15 +241,7 @@
5 print 'usage: %s [options] [start|stop|restart]' % argv[0]
6 sys.exit(1)
7
8- class NoNewlineFormatter(logging.Formatter):
9- """Strips newlines from default formatter"""
10- def format(self, record):
11- """Grabs default formatter's output and strips newlines"""
12- data = logging.Formatter.format(self, record)
13- return data.replace("\n", "--")
14-
15- # NOTE(vish): syslog-ng doesn't handle newlines from trackbacks very well
16- formatter = NoNewlineFormatter(
17+ formatter = logging.Formatter(
18 '(%(name)s): %(levelname)s %(message)s')
19 handler = logging.StreamHandler(log.StdioOnnaStick())
20 handler.setFormatter(formatter)