~jamesodhunt/upstart/job-logging-fork-on-write-persistent-user-logger

« back to all changes in this revision

Viewing changes to ChangeLog

  • Committer: James Hunt
  • Date: 2011-10-27 16:33:23 UTC
  • Revision ID: james.hunt@ubuntu.com-20111027163323-m002vtyafnd1suy7
Introduction of 'log' argument to 'console' stanza allowing
job output to be captured.

* contrib/vim/syntax/upstart.vim: Added 'log' and missing
  'none'.
* init/Makefile.am: Added log.c, log.h and test_log.c
* init/job.c: job_new(): Initialize log.
* init/job.h: Add Log pointer to Job.
* init/job_class.c: XXX: behaviour change: Default for 'console'
  is now CONSOLE_LOG rather than CONSOLE_NONE.
  Rationale is that if a job does produce output, you want to see
  it since the chances are it will contain useful error details.
* init/job_class.h: Added CONSOLE_LOG to ConsoleType and updated
  documentation for ConsoleType.
* init/job_process.c:
  - job_process_run(): Updated to reflect new parameter for
    job_process_spawn().
  - job_process_spawn(): Now accepts a Job rather than a
    JobClass to allow job->log and class->console to be handled
    appropriately. Now creates pty master and slave fds for
    console logging.
  - job_process_error_read(): Added entries for:
    - JOB_PROCESS_ERROR_OPENPT_MASTER
    - JOB_PROCESS_ERROR_OPENPT_UNLOCKPT
    - JOB_PROCESS_ERROR_PTSNAME
    - JOB_PROCESS_ERROR_OPENPT_SLAVE
  - job_process_log_path(): New function that returns full path to log
    file for specified Job.
* init/job_process.h:
  - Updated JobProcessErrorType with new entries:
    - JOB_PROCESS_ERROR_OPENPT_MASTER
    - JOB_PROCESS_ERROR_OPENPT_UNLOCKPT
    - JOB_PROCESS_ERROR_PTSNAME
    - JOB_PROCESS_ERROR_OPENPT_SLAVE
  - job_process_spawn(): Updated prototype.
  - job_process_log_path(): Added prototype.
* init/main.c:
  - handle_logdir(): New function for overriding log directory.
  - Added '--logdir' to options.
* init/man/init.5:
  - Update and restructure of section on 'console' stanza.
  - Added a FILES section.
* init/man/init.8: Updated with details of new '--logdir' option.
* init/parse_job.c: stanza_console(): Updated for "log".
* init/paths.h: Added defines for JOB_LOGDIR, LOGDIR_ENV, XDG_CACHE_HOME
  and USER_JOB_LOGDIR.
* init/session.c: Added missing function headers. New functions:
  session_user_home() and session_user_group().
* init/session.h: Added prototypes for session_user_home() and
  session_user_group().
* init/system.c: system_setup_console(): Update for CONSOLE_LOG.
* init/test_conf.c:
  - TEST_FORCE_WATCH_UPDATE(): Removed debug.
  - test_select_job(): Added variable attributes to keep gcc 4.6 happy.
* init/test_event.c: Explicitly set console type to CONSOLE_NONE to
  retain behaviour of existing tests.
* init/test_job.c:
  - test_job_new(): Ensure log object not created on Job instantiation.
  - test_change_state(): Explicitly set console type to CONSOLE_NONE to
    retain behaviour of existing tests.
* init/test_job_class.c:
  - test_new(): Ensure console type now defaults to CONSOLE_LOG.
  - Explicitly set console type to CONSOLE_NONE to retain behaviour of
    existing tests.
* init/test_job_process.c:
  - child(): New child_tests added for TEST_OUTPUT and TEST_SIGNALS.
  - get_available_pty_count(): New function.
  - Explicitly set console type to CONSOLE_NONE to retain behaviour of
    existing tests.
  - test_run(): Added new tests for CONSOLE_LOG.
  - test_spawn(): Added new tests for CONSOLE_LOG.
  - test_log_path(): New function.
  - test_handler(): Added UPSTART_LOGDIR support to 
  - main():
    - Update to allow number of forks to be specified when run as a child
      process.
    - Added call to test_log_path().
    - initialize various subsystems since before, functions run from
      main() had to be run in the order specified and exactly as listed
     (certain tests relied on previous tests initializing a subsystem
     which gives unexpected results and thus confusing behaviour
     if the order of tests is changed).
* util/tests/test_user_sessions.sh: Added tests for job logging.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
2011-10-27  James Hunt  <james.hunt@ubuntu.com>
 
2
 
 
3
        Introduction of 'log' argument to 'console' stanza allowing
 
4
        job output to be captured.
 
5
        
 
6
        * contrib/vim/syntax/upstart.vim: Added 'log' and missing
 
7
          'none'.
 
8
        * init/Makefile.am: Added log.c, log.h and test_log.c
 
9
        * init/job.c: job_new(): Initialize log.
 
10
        * init/job.h: Add Log pointer to Job.
 
11
        * init/job_class.c: XXX: behaviour change: Default for 'console'
 
12
          is now CONSOLE_LOG rather than CONSOLE_NONE.
 
13
          Rationale is that if a job does produce output, you want to see
 
14
          it since the chances are it will contain useful error details.
 
15
        * init/job_class.h: Added CONSOLE_LOG to ConsoleType and updated
 
16
          documentation for ConsoleType.
 
17
        * init/job_process.c:
 
18
          - job_process_run(): Updated to reflect new parameter for
 
19
            job_process_spawn().
 
20
          - job_process_spawn(): Now accepts a Job rather than a
 
21
            JobClass to allow job->log and class->console to be handled
 
22
            appropriately. Now creates pty master and slave fds for
 
23
            console logging.
 
24
          - job_process_error_read(): Added entries for:
 
25
            - JOB_PROCESS_ERROR_OPENPT_MASTER
 
26
            - JOB_PROCESS_ERROR_OPENPT_UNLOCKPT
 
27
            - JOB_PROCESS_ERROR_PTSNAME
 
28
            - JOB_PROCESS_ERROR_OPENPT_SLAVE
 
29
          - job_process_log_path(): New function that returns full path to log
 
30
            file for specified Job.
 
31
        * init/job_process.h:
 
32
          - Updated JobProcessErrorType with new entries:
 
33
            - JOB_PROCESS_ERROR_OPENPT_MASTER
 
34
            - JOB_PROCESS_ERROR_OPENPT_UNLOCKPT
 
35
            - JOB_PROCESS_ERROR_PTSNAME
 
36
            - JOB_PROCESS_ERROR_OPENPT_SLAVE
 
37
          - job_process_spawn(): Updated prototype.
 
38
          - job_process_log_path(): Added prototype.
 
39
        * init/main.c:
 
40
          - handle_logdir(): New function for overriding log directory.
 
41
          - Added '--logdir' to options.
 
42
        * init/man/init.5:
 
43
          - Update and restructure of section on 'console' stanza.
 
44
          - Added a FILES section.
 
45
        * init/man/init.8: Updated with details of new '--logdir' option.
 
46
        * init/parse_job.c: stanza_console(): Updated for "log".
 
47
        * init/paths.h: Added defines for JOB_LOGDIR, LOGDIR_ENV, XDG_CACHE_HOME
 
48
          and USER_JOB_LOGDIR.
 
49
        * init/session.c: Added missing function headers. New functions:
 
50
          session_user_home() and session_user_group().
 
51
        * init/session.h: Added prototypes for session_user_home() and
 
52
          session_user_group().
 
53
        * init/system.c: system_setup_console(): Update for CONSOLE_LOG.
 
54
        * init/test_conf.c:
 
55
          - TEST_FORCE_WATCH_UPDATE(): Removed debug.
 
56
          - test_select_job(): Added variable attributes to keep gcc 4.6 happy.
 
57
        * init/test_event.c: Explicitly set console type to CONSOLE_NONE to
 
58
          retain behaviour of existing tests.
 
59
        * init/test_job.c:
 
60
          - test_job_new(): Ensure log object not created on Job instantiation.
 
61
          - test_change_state(): Explicitly set console type to CONSOLE_NONE to
 
62
            retain behaviour of existing tests.
 
63
        * init/test_job_class.c:
 
64
          - test_new(): Ensure console type now defaults to CONSOLE_LOG.
 
65
          - Explicitly set console type to CONSOLE_NONE to retain behaviour of
 
66
            existing tests.
 
67
        * init/test_job_process.c:
 
68
          - child(): New child_tests added for TEST_OUTPUT and TEST_SIGNALS.
 
69
          - get_available_pty_count(): New function.
 
70
          - Explicitly set console type to CONSOLE_NONE to retain behaviour of
 
71
            existing tests.
 
72
          - test_run(): Added new tests for CONSOLE_LOG.
 
73
          - test_spawn(): Added new tests for CONSOLE_LOG.
 
74
          - test_log_path(): New function.
 
75
          - test_handler(): Added UPSTART_LOGDIR support to 
 
76
          - main():
 
77
            - Update to allow number of forks to be specified when run as a child
 
78
              process.
 
79
            - Added call to test_log_path().
 
80
            - initialize various subsystems since before, functions run from
 
81
              main() had to be run in the order specified and exactly as listed
 
82
             (certain tests relied on previous tests initializing a subsystem
 
83
             which gives unexpected results and thus confusing behaviour
 
84
             if the order of tests is changed).
 
85
        * util/tests/test_user_sessions.sh: Added tests for job logging.
 
86
 
1
87
2011-08-11  Scott James Remnant  <keybuk@google.com>
2
88
 
3
89
        * init/job_process.c (job_process_spawn): Can't return on
22
108
 
23
109
        * init/job_class.c (job_class_new): nit, use #defines for the default
24
110
        nice level and oom score adjustment.
25
 
 
26
111
2011-07-25  James Hunt  <james.hunt@ubuntu.com>
27
112
 
28
113
        * init/job_process.c: job_process_spawn():