Add support for JSON logging for audit events

This will add audit_json.log that writes one line per audit event. For
example:

{
       "severity":"INFO",
       "time":"2018-10-17T17:38:22.523Z",
       "author_id":3,
       "entity_id":2,
       "entity_type":"Project",
       "change":"visibility",
       "from":"Private",
       "to":"Public",
       "author_name":"John Doe4",
       "target_id":2,
       "target_type":"Project",
       "target_details":"namespace2/project2"
}
93 jobs for sh-add-audit-logging-json-ce in 36 minutes and 59 seconds (queued for 5 seconds)
Status Job ID Name Coverage
  Build
manual #109985499
gitlab-org allowed to fail manual
review-docs-deploy-manual
 
  Prepare
passed #109985501
gitlab-org
compile-assets

00:07:33

passed #109985500
gitlab-org
retrieve-tests-metadata

00:00:21

passed #109985502
gitlab-org
setup-test-env

00:07:35

 
  Test
passed #109985587
allowed to fail
code_quality

00:08:22

passed #109985504
allowed to fail
danger-review

00:02:04

passed #109985578
gitlab-org
db:check-schema-pg

00:02:47

passed #109985577
gitlab-org
db:migrate:reset-mysql

00:06:01

passed #109985576
gitlab-org
db:migrate:reset-pg

00:03:28

passed #109985582
gitlab-org
db:rollback-mysql

00:04:59

passed #109985581
gitlab-org
db:rollback-pg

00:03:05

passed #109985589
allowed to fail
dependency_scanning

00:04:10

passed #109985572
gitlab-org
docs lint

00:01:20

passed #109985573
gitlab-org
downtime_check

00:02:14

passed #109985575
gitlab-org
ee_compat_check

00:03:43

passed #109985585
gitlab-org
gitlab:assets:compile

00:12:41

passed #109985584
gitlab-org
gitlab:setup-mysql

00:05:09

passed #109985583
gitlab-org
gitlab:setup-pg

00:05:18

passed #109985592
gitlab-org
gitlab_git_test

00:00:52

passed #109985586
gitlab-org
karma

00:09:40

57.72%
passed #109985580
gitlab-org
migration:path-mysql

00:13:28

passed #109985579
gitlab-org
migration:path-pg

00:11:32

passed #109985593
gitlab-org
no_ee_check

00:00:53

manual #109985503
allowed to fail manual
package-and-qa
passed #109985590
gitlab-org
qa:internal

00:03:11

passed #109985591
gitlab-org
qa:selectors

00:03:20

passed #109985574
gitlab-org
rails5_gemfile_lock_check

00:02:23

passed #109985537
gitlab-org
rspec-mysql 0 30

00:14:48

passed #109985538
gitlab-org
rspec-mysql 1 30

00:14:58

passed #109985549
gitlab-org
rspec-mysql 10 30

00:17:56

passed #109985551
gitlab-org
rspec-mysql 11 30

00:21:02

passed #109985552
gitlab-org
rspec-mysql 12 30

00:19:46

passed #109985553
gitlab-org
rspec-mysql 13 30

00:18:52

passed #109985554
gitlab-org
rspec-mysql 14 30

00:19:21

passed #109985555
gitlab-org
rspec-mysql 15 30

00:23:44

passed #109985556
gitlab-org
rspec-mysql 16 30

00:19:33

passed #109985557
gitlab-org
rspec-mysql 17 30

00:20:22

passed #109985558
gitlab-org
rspec-mysql 18 30

00:20:05

passed #109985559
gitlab-org
rspec-mysql 19 30

00:21:15

passed #109985539
gitlab-org
rspec-mysql 2 30

00:18:48

passed #109985560
gitlab-org
rspec-mysql 20 30

00:19:37

passed #109985561
gitlab-org
rspec-mysql 21 30

00:18:09

passed #109985562
gitlab-org
rspec-mysql 22 30

00:18:55

passed #109985563
gitlab-org
rspec-mysql 23 30

00:19:04

passed #109985564
gitlab-org
rspec-mysql 24 30

00:18:09

passed #109985565
gitlab-org
rspec-mysql 25 30

00:24:18

passed #109985566
gitlab-org
rspec-mysql 26 30

00:21:38

passed #109985567
gitlab-org
rspec-mysql 27 30

00:24:09

passed #109985568
gitlab-org
rspec-mysql 28 30

00:22:44

passed #109985570
gitlab-org
rspec-mysql 29 30

00:18:52

passed #109985540
gitlab-org
rspec-mysql 3 30

00:22:13

passed #109985541
gitlab-org
rspec-mysql 4 30

00:17:26

passed #109985542
gitlab-org
rspec-mysql 5 30

00:19:41

passed #109985543
gitlab-org
rspec-mysql 6 30

00:17:46

passed #109985544
gitlab-org
rspec-mysql 7 30

00:18:00

passed #109985545
gitlab-org
rspec-mysql 8 30

00:16:44

passed #109985547
gitlab-org
rspec-mysql 9 30

00:18:14

passed #109985505
gitlab-org
rspec-pg 0 30

00:18:50

passed #109985506
gitlab-org
rspec-pg 1 30

00:16:07

passed #109985516
gitlab-org
rspec-pg 10 30

00:16:26

passed #109985517
gitlab-org
rspec-pg 11 30

00:17:23

passed #109985518
gitlab-org
rspec-pg 12 30

00:16:37

passed #109985519
gitlab-org
rspec-pg 13 30

00:16:49

passed #109985520
gitlab-org
rspec-pg 14 30

00:17:15

passed #109985522
gitlab-org
rspec-pg 15 30

00:18:16

passed #109985523
gitlab-org
rspec-pg 16 30

00:18:35

passed #109985524
gitlab-org
rspec-pg 17 30

00:19:11

passed #109985525
gitlab-org
rspec-pg 18 30

00:18:50

passed #109985526
gitlab-org
rspec-pg 19 30

00:18:12

passed #109985507
gitlab-org
rspec-pg 2 30

00:14:44

passed #109985527
gitlab-org
rspec-pg 20 30

00:18:48

passed #109985528
gitlab-org
rspec-pg 21 30

00:18:12

passed #109985529
gitlab-org
rspec-pg 22 30

00:19:50

passed #109985530
gitlab-org
rspec-pg 23 30

00:17:03

passed #109985531
gitlab-org
rspec-pg 24 30

00:16:54

passed #109985532
gitlab-org
rspec-pg 25 30

00:17:14

passed #109985533
gitlab-org
rspec-pg 26 30

00:18:53

passed #109985534
gitlab-org
rspec-pg 27 30

00:18:37

passed #109985535
gitlab-org
rspec-pg 28 30

00:18:46

passed #109985536
gitlab-org
rspec-pg 29 30

00:18:10

passed #109985508
gitlab-org
rspec-pg 3 30

00:16:16

passed #109985509
gitlab-org
rspec-pg 4 30

00:17:12

passed #109985510
gitlab-org
rspec-pg 5 30

00:16:43

passed #109985512
gitlab-org
rspec-pg 6 30

00:17:05

passed #109985513
gitlab-org
rspec-pg 7 30

00:21:00

passed #109985514
gitlab-org
rspec-pg 8 30

00:15:38

passed #109985515
gitlab-org
rspec-pg 9 30

00:17:58

passed #109985588
allowed to fail
sast

00:04:00

passed #109985571
gitlab-org
static-analysis

00:14:02

 
  Post Test
passed #109985595
gitlab-org
coverage

00:04:54

94.82%
failed #109985594
gitlab-org allowed to fail
flaky-examples-check

00:01:12

passed #109985596
gitlab-org
lint:javascript:report

00:03:50

 
  Post Cleanup
manual #109985597
gitlab-org allowed to fail manual
review-docs-cleanup
 
Name Stage Failure
failed
flaky-examples-check Post Test
    "first_flaky_at": "2018-10-18 23:14:01 +0000",
"last_flaky_at": "2018-10-18 23:14:01 +0000",
"last_flaky_job": "https://gitlab.com/gitlab-org/gitlab-ce/-/jobs/109985531"
}
}
Running after script...
$ date
Thu Oct 18 23:33:00 UTC 2018
ERROR: Job failed: exit code 1