File tree 6 files changed +167
-0
lines changed
plugins/tasks/log/src/main/java/com/walmartlabs/concord/plugins/log
6 files changed +167
-0
lines changed Original file line number Diff line number Diff line change 4
4
5
5
### Added
6
6
7
+ - log-tasks: ` logDebug ` , ` logWarn ` and ` logError ` tasks;
7
8
- concord-server: initial support for RBAC permissions;
8
9
- ansible: initial Kerberos authentication support.
9
10
Original file line number Diff line number Diff line change
1
+ configuration :
2
+ arguments :
3
+ name : " Concord"
4
+ runner :
5
+ logLevel : " DEBUG"
6
+
7
+ flows :
8
+ default :
9
+ - ${log.debug("This is a debug log")}
10
+ - ${log.info("This is a info log")}
11
+ - ${log.warn("This is a warn log")}
12
+ - ${log.error("This is a error log")}
13
+
14
+ - logDebug : " Hello, ${name}. This is a debug log"
15
+ - log : " Hello, ${name}. This is a normal log"
16
+ - logWarn : " Hello, ${name}. This is a warn log"
17
+ - logError : " Hello, ${name}. This is a error log"
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ SERVER_ADDR=" $1 "
4
+
5
+ rm -rf target && mkdir target
6
+ cp -R concord.yml target/
7
+
8
+ cd target && zip -r payload.zip ./* > /dev/null && cd ..
9
+
10
+ read -p " Username: " CURL_USER
11
+ curl -u ${CURL_USER} -F archive=@target/payload.zip http://${SERVER_ADDR} /api/v1/process
Original file line number Diff line number Diff line change
1
+ package com .walmartlabs .concord .plugins .log ;
2
+
3
+ /*-
4
+ * *****
5
+ * Concord
6
+ * -----
7
+ * Copyright (C) 2017 - 2018 Walmart Inc.
8
+ * -----
9
+ * Licensed under the Apache License, Version 2.0 (the "License");
10
+ * you may not use this file except in compliance with the License.
11
+ * You may obtain a copy of the License at
12
+ *
13
+ * http://www.apache.org/licenses/LICENSE-2.0
14
+ *
15
+ * Unless required by applicable law or agreed to in writing, software
16
+ * distributed under the License is distributed on an "AS IS" BASIS,
17
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ * See the License for the specific language governing permissions and
19
+ * limitations under the License.
20
+ * =====
21
+ */
22
+
23
+ import com .walmartlabs .concord .sdk .Context ;
24
+ import com .walmartlabs .concord .sdk .Task ;
25
+ import org .slf4j .Logger ;
26
+ import org .slf4j .LoggerFactory ;
27
+
28
+ import javax .inject .Named ;
29
+
30
+ import static com .walmartlabs .concord .sdk .ContextUtils .assertString ;
31
+
32
+ @ Named ("logDebug" )
33
+ public class LogDebugTask implements Task {
34
+
35
+ public static final Logger log = LoggerFactory .getLogger (LogDebugTask .class );
36
+
37
+ public void call (String s ) {
38
+ log .debug (s );
39
+ }
40
+
41
+ @ Override
42
+ public void execute (Context ctx ) {
43
+ String msg = assertString (ctx , "msg" );
44
+ log .debug (msg );
45
+ }
46
+ }
Original file line number Diff line number Diff line change
1
+ package com .walmartlabs .concord .plugins .log ;
2
+
3
+ /*-
4
+ * *****
5
+ * Concord
6
+ * -----
7
+ * Copyright (C) 2017 - 2018 Walmart Inc.
8
+ * -----
9
+ * Licensed under the Apache License, Version 2.0 (the "License");
10
+ * you may not use this file except in compliance with the License.
11
+ * You may obtain a copy of the License at
12
+ *
13
+ * http://www.apache.org/licenses/LICENSE-2.0
14
+ *
15
+ * Unless required by applicable law or agreed to in writing, software
16
+ * distributed under the License is distributed on an "AS IS" BASIS,
17
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ * See the License for the specific language governing permissions and
19
+ * limitations under the License.
20
+ * =====
21
+ */
22
+
23
+ import com .walmartlabs .concord .sdk .Context ;
24
+ import com .walmartlabs .concord .sdk .Task ;
25
+ import org .slf4j .Logger ;
26
+ import org .slf4j .LoggerFactory ;
27
+
28
+ import javax .inject .Named ;
29
+
30
+ import static com .walmartlabs .concord .sdk .ContextUtils .assertString ;
31
+
32
+ @ Named ("logError" )
33
+ public class LogErrorTask implements Task {
34
+
35
+ public static final Logger log = LoggerFactory .getLogger (LogErrorTask .class );
36
+
37
+ public void call (String s ) {
38
+ log .error (s );
39
+ }
40
+
41
+ @ Override
42
+ public void execute (Context ctx ) {
43
+ String msg = assertString (ctx , "msg" );
44
+ log .error (msg );
45
+ }
46
+ }
Original file line number Diff line number Diff line change
1
+ package com .walmartlabs .concord .plugins .log ;
2
+
3
+ /*-
4
+ * *****
5
+ * Concord
6
+ * -----
7
+ * Copyright (C) 2017 - 2018 Walmart Inc.
8
+ * -----
9
+ * Licensed under the Apache License, Version 2.0 (the "License");
10
+ * you may not use this file except in compliance with the License.
11
+ * You may obtain a copy of the License at
12
+ *
13
+ * http://www.apache.org/licenses/LICENSE-2.0
14
+ *
15
+ * Unless required by applicable law or agreed to in writing, software
16
+ * distributed under the License is distributed on an "AS IS" BASIS,
17
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18
+ * See the License for the specific language governing permissions and
19
+ * limitations under the License.
20
+ * =====
21
+ */
22
+
23
+ import com .walmartlabs .concord .sdk .Context ;
24
+ import com .walmartlabs .concord .sdk .Task ;
25
+ import org .slf4j .Logger ;
26
+ import org .slf4j .LoggerFactory ;
27
+
28
+ import javax .inject .Named ;
29
+
30
+ import static com .walmartlabs .concord .sdk .ContextUtils .assertString ;
31
+
32
+ @ Named ("logWarn" )
33
+ public class LogWarnTask implements Task {
34
+
35
+ public static final Logger log = LoggerFactory .getLogger (LogWarnTask .class );
36
+
37
+ public void call (String s ) {
38
+ log .warn (s );
39
+ }
40
+
41
+ @ Override
42
+ public void execute (Context ctx ) {
43
+ String msg = assertString (ctx , "msg" );
44
+ log .warn (msg );
45
+ }
46
+ }
You can’t perform that action at this time.
0 commit comments