diff --git a/errorreporting/pom.xml b/errorreporting/pom.xml index 0b9acef34d0..80562bb52f9 100644 --- a/errorreporting/pom.xml +++ b/errorreporting/pom.xml @@ -16,8 +16,8 @@ limitations under the License. 4.0.0 - com.google.cloud.logging.samples - cloud-logging-samples + com.google.cloud.errorreporting.samples + cloud-errorreporting-samples pom - doc-samples - com.google.cloud - 1.0.0 - .. + com.google.cloud.samples + shared-configuration + 1.0.8 + + UTF-8 + 1.8 + 1.8 + + com.google.apis @@ -60,12 +69,6 @@ - - UTF-8 - 1.7 - 1.7 - - src/main/java diff --git a/kms/src/main/java/com/example/CryptFile.java b/kms/src/main/java/com/example/CryptFile.java index baf55334a47..205c6356335 100644 --- a/kms/src/main/java/com/example/CryptFile.java +++ b/kms/src/main/java/com/example/CryptFile.java @@ -1,15 +1,17 @@ /* - * Copyright (c) 2017 Google Inc. + * Copyright 2017 Google Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.example; @@ -25,12 +27,10 @@ import com.google.api.services.cloudkms.v1.model.DecryptResponse; import com.google.api.services.cloudkms.v1.model.EncryptRequest; import com.google.api.services.cloudkms.v1.model.EncryptResponse; - +import java.io.IOException; import org.kohsuke.args4j.CmdLineException; import org.kohsuke.args4j.CmdLineParser; -import java.io.IOException; - public class CryptFile { /** diff --git a/kms/src/main/java/com/example/CryptFileCommands.java b/kms/src/main/java/com/example/CryptFileCommands.java index 1bd4591fc84..42a415bcec2 100644 --- a/kms/src/main/java/com/example/CryptFileCommands.java +++ b/kms/src/main/java/com/example/CryptFileCommands.java @@ -1,31 +1,31 @@ /* - * Copyright (c) 2017 Google Inc. + * Copyright 2017 Google Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.example; +import java.io.FileOutputStream; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; import org.kohsuke.args4j.Argument; import org.kohsuke.args4j.Option; import org.kohsuke.args4j.spi.SubCommand; import org.kohsuke.args4j.spi.SubCommandHandler; import org.kohsuke.args4j.spi.SubCommands; -import java.nio.file.Files; -import java.nio.file.Paths; - -import java.io.FileOutputStream; -import java.io.IOException; - /** * Defines the different sub-commands and their parameters, for command-line invocation. */ diff --git a/kms/src/main/java/com/example/Quickstart.java b/kms/src/main/java/com/example/Quickstart.java index 32301b0d1ba..eda21547ce7 100644 --- a/kms/src/main/java/com/example/Quickstart.java +++ b/kms/src/main/java/com/example/Quickstart.java @@ -1,20 +1,24 @@ /* - Copyright 2016, Google, Inc. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ + * Copyright 2017 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.example; // [START kms_quickstart] // Imports the Google Cloud client library + import com.google.api.client.googleapis.auth.oauth2.GoogleCredential; import com.google.api.client.http.HttpTransport; import com.google.api.client.http.javanet.NetHttpTransport; @@ -24,7 +28,6 @@ import com.google.api.services.cloudkms.v1.CloudKMSScopes; import com.google.api.services.cloudkms.v1.model.KeyRing; import com.google.api.services.cloudkms.v1.model.ListKeyRingsResponse; - import java.io.IOException; public class Quickstart { diff --git a/kms/src/main/java/com/example/SnippetCommands.java b/kms/src/main/java/com/example/SnippetCommands.java index 2f472934399..50d4e527ea1 100644 --- a/kms/src/main/java/com/example/SnippetCommands.java +++ b/kms/src/main/java/com/example/SnippetCommands.java @@ -1,27 +1,28 @@ /* - * Copyright (c) 2017 Google Inc. + * Copyright 2017 Google Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.example; +import java.io.IOException; import org.kohsuke.args4j.Argument; import org.kohsuke.args4j.Option; import org.kohsuke.args4j.spi.SubCommand; import org.kohsuke.args4j.spi.SubCommandHandler; import org.kohsuke.args4j.spi.SubCommands; -import java.io.IOException; - /** * Defines the different sub-commands and their parameters, for command-line invocation. */ diff --git a/kms/src/main/java/com/example/Snippets.java b/kms/src/main/java/com/example/Snippets.java index 44f05be45e8..2ad7268d7b4 100644 --- a/kms/src/main/java/com/example/Snippets.java +++ b/kms/src/main/java/com/example/Snippets.java @@ -1,15 +1,17 @@ /* - * Copyright (c) 2017 Google Inc. + * Copyright 2017 Google Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.example; @@ -20,18 +22,17 @@ import com.google.api.client.json.JsonFactory; import com.google.api.client.json.jackson2.JacksonFactory; import com.google.api.services.cloudkms.v1.CloudKMS; -import com.google.api.services.cloudkms.v1.CloudKMS.Projects.Locations.KeyRings.CryptoKeys.UpdatePrimaryVersion; import com.google.api.services.cloudkms.v1.CloudKMSScopes; import com.google.api.services.cloudkms.v1.model.Binding; import com.google.api.services.cloudkms.v1.model.CryptoKey; import com.google.api.services.cloudkms.v1.model.CryptoKeyVersion; import com.google.api.services.cloudkms.v1.model.DestroyCryptoKeyVersionRequest; -import com.google.api.services.cloudkms.v1.model.RestoreCryptoKeyVersionRequest; import com.google.api.services.cloudkms.v1.model.KeyRing; import com.google.api.services.cloudkms.v1.model.ListCryptoKeyVersionsResponse; import com.google.api.services.cloudkms.v1.model.ListCryptoKeysResponse; import com.google.api.services.cloudkms.v1.model.ListKeyRingsResponse; import com.google.api.services.cloudkms.v1.model.Policy; +import com.google.api.services.cloudkms.v1.model.RestoreCryptoKeyVersionRequest; import com.google.api.services.cloudkms.v1.model.SetIamPolicyRequest; import com.google.api.services.cloudkms.v1.model.UpdateCryptoKeyPrimaryVersionRequest; import java.io.IOException; @@ -179,8 +180,7 @@ public static CryptoKeyVersion disableCryptoKeyVersion( } // [END kms_disable_cryptokey_version] - // [START kms_enable_cryptokey_version] - + // [START kms_enable_cryptokey_version] /** * Enables the given version of the crypto key. */ @@ -563,7 +563,7 @@ public static void listCryptoKeys(String projectId, String locationId, String ke for (CryptoKey key : cryptoKeys.getCryptoKeys()) { System.out.println(key); } - } while(cryptoKeys.getNextPageToken() != null); + } while (cryptoKeys.getNextPageToken() != null); } /** diff --git a/kms/src/test/java/com/example/QuickstartIT.java b/kms/src/test/java/com/example/QuickstartIT.java index c2f4c33f8dd..1ca8675b64e 100644 --- a/kms/src/test/java/com/example/QuickstartIT.java +++ b/kms/src/test/java/com/example/QuickstartIT.java @@ -1,21 +1,25 @@ /* - * Copyright (c) 2017 Google Inc. + * Copyright 2017 Google Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.example; import static com.google.common.truth.Truth.assertThat; +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; import org.junit.AfterClass; import org.junit.Before; import org.junit.BeforeClass; @@ -23,9 +27,6 @@ import org.junit.runner.RunWith; import org.junit.runners.JUnit4; -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; - /** * Integration (system) tests for {@link Quickstart}. */ diff --git a/kms/src/test/java/com/example/SnippetsIT.java b/kms/src/test/java/com/example/SnippetsIT.java index 60a037f9673..1622b634377 100644 --- a/kms/src/test/java/com/example/SnippetsIT.java +++ b/kms/src/test/java/com/example/SnippetsIT.java @@ -1,15 +1,17 @@ /* - * Copyright (c) 2017 Google Inc. + * Copyright 2017 Google Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except - * in compliance with the License. You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software distributed under the License - * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express - * or implied. See the License for the specific language governing permissions and limitations under - * the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.example; diff --git a/language/README.md b/language/README.md index 79e2cbd9aa5..83f87f76abe 100644 --- a/language/README.md +++ b/language/README.md @@ -1,5 +1,8 @@ # Google Cloud Natural Language API Samples + +Open in Cloud Shell + These samples demonstrate the use of the [Google Cloud Natural Language API][NL-Docs]. [NL-Docs]: https://cloud.google.com/natural-language/docs/ diff --git a/language/analysis/README.md b/language/analysis/README.md index 4629b3e6e46..321c1c2375b 100644 --- a/language/analysis/README.md +++ b/language/analysis/README.md @@ -1,5 +1,9 @@ # Google Cloud Natural Language API Entity Recognition Sample + +Open in Cloud Shell + + This sample demonstrates the use of the [Google Cloud Natural Language API][NL-Docs] for entity recognition. diff --git a/language/analysis/pom.xml b/language/analysis/pom.xml index 0f790227a34..cd45abb6044 100644 --- a/language/analysis/pom.xml +++ b/language/analysis/pom.xml @@ -20,12 +20,19 @@ limitations under the License. com.google.cloud.language.samples language-entities + - doc-samples - com.google.cloud - 1.0.0 - ../.. + com.google.cloud.samples + shared-configuration + 1.0.8 + + 1.8 + 1.8 + diff --git a/language/cloud-client/README.md b/language/cloud-client/README.md index f217f04cea3..288c54e38e4 100644 --- a/language/cloud-client/README.md +++ b/language/cloud-client/README.md @@ -1,5 +1,8 @@ # Getting Started with Google Cloud Natural Language API and the Google Cloud Client libraries + +Open in Cloud Shell + [Google Cloud Natural Language API][language] provides natural language understanding technologies to developers, including sentiment analysis, entity recognition, and syntax analysis. This API is part of the larger collection of diff --git a/language/cloud-client/pom.xml b/language/cloud-client/pom.xml index 3f2d0085a59..d950efe57d3 100644 --- a/language/cloud-client/pom.xml +++ b/language/cloud-client/pom.xml @@ -19,14 +19,15 @@ language-google-cloud-samples jar - + - doc-samples - com.google.cloud - 1.0.0 - ../.. + com.google.cloud.samples + shared-configuration + 1.0.8 - 1.8 1.8 diff --git a/language/cloud-client/src/main/java/com/example/language/QuickstartSample.java b/language/cloud-client/src/main/java/com/example/language/QuickstartSample.java index e04a55449b9..85f516bd1ef 100644 --- a/language/cloud-client/src/main/java/com/example/language/QuickstartSample.java +++ b/language/cloud-client/src/main/java/com/example/language/QuickstartSample.java @@ -1,18 +1,18 @@ /* - Copyright 2016, Google, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ + * Copyright 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.example.language; diff --git a/language/cloud-client/src/test/java/com/example/language/QuickstartSampleIT.java b/language/cloud-client/src/test/java/com/example/language/QuickstartSampleIT.java index d814f1ea232..4fad6479404 100644 --- a/language/cloud-client/src/test/java/com/example/language/QuickstartSampleIT.java +++ b/language/cloud-client/src/test/java/com/example/language/QuickstartSampleIT.java @@ -1,24 +1,23 @@ /* - Copyright 2016, Google, Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ + * Copyright 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.example.language; import static com.google.common.truth.Truth.assertThat; - import java.io.ByteArrayOutputStream; import java.io.PrintStream; import org.junit.After; diff --git a/logging/cloud-client/README.md b/logging/cloud-client/README.md index 25b17a1d750..a6fb09f6578 100644 --- a/logging/cloud-client/README.md +++ b/logging/cloud-client/README.md @@ -1,5 +1,8 @@ # Getting Started with Stackdriver Logging and the Google Cloud Client libraries + +Open in Cloud Shell + [Stackdriver Logging][logging] allows you to store, search, analyze, monitor, and alert on log data and events from Google Cloud Platform and Amazon Web Services. diff --git a/logging/cloud-client/pom.xml b/logging/cloud-client/pom.xml index 16824687d86..792b8fe4338 100644 --- a/logging/cloud-client/pom.xml +++ b/logging/cloud-client/pom.xml @@ -19,12 +19,14 @@ logging-google-cloud-samples-api jar - + - com.google.cloud.logging.samples - cloud-logging-samples - 1.0.0 - .. + com.google.cloud.samples + shared-configuration + 1.0.8 diff --git a/logging/cloud-client/src/main/java/com/example/logging/ListLogs.java b/logging/cloud-client/src/main/java/com/example/logging/ListLogs.java index 9599f46d786..ba99d95f1c0 100644 --- a/logging/cloud-client/src/main/java/com/example/logging/ListLogs.java +++ b/logging/cloud-client/src/main/java/com/example/logging/ListLogs.java @@ -1,18 +1,18 @@ /* - Copyright 2017 Google Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ + * Copyright 2017 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.example.logging; @@ -47,7 +47,7 @@ public static void main(String... args) throws Exception { System.out.println(logEntry); } entries = entries.getNextPage(); - } while(entries != null); + } while (entries != null); } // [END listlogs] diff --git a/logging/cloud-client/src/main/java/com/example/logging/QuickstartSample.java b/logging/cloud-client/src/main/java/com/example/logging/QuickstartSample.java index 444642e0f9e..b8c2f30e4c4 100644 --- a/logging/cloud-client/src/main/java/com/example/logging/QuickstartSample.java +++ b/logging/cloud-client/src/main/java/com/example/logging/QuickstartSample.java @@ -1,18 +1,18 @@ /* - Copyright 2016 Google Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ + * Copyright 2016 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.example.logging; @@ -29,7 +29,8 @@ * This sample demonstrates writing logs using the Stackdriver Logging API. * The library also offers a java.util.logging Handler `com.google.cloud.logging.LoggingHandler` * Logback integration is also available : https://goo.gl/DNMoRh - * Using the java.util.logging handler / Logback appender should be preferred to using the API directly. + * Using the java.util.logging handler / Logback appender should be preferred to using the API + * directly. */ public class QuickstartSample { diff --git a/logging/cloud-client/src/test/java/com/example/logging/LoggingIT.java b/logging/cloud-client/src/test/java/com/example/logging/LoggingIT.java index 9d669da05ef..beb6623fc86 100644 --- a/logging/cloud-client/src/test/java/com/example/logging/LoggingIT.java +++ b/logging/cloud-client/src/test/java/com/example/logging/LoggingIT.java @@ -1,18 +1,18 @@ /* - Copyright 2017 Google Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ + * Copyright 2017 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.example.logging; @@ -39,8 +39,8 @@ @SuppressWarnings("checkstyle:abbreviationaswordinname") public class LoggingIT { - private final String QUICKSTART_LOG = "my-log"; - private final String TEST_WRITE_LOG = "test-log"; + private static final String QUICKSTART_LOG = "my-log"; + private static final String TEST_WRITE_LOG = "test-log"; private ByteArrayOutputStream bout; private PrintStream out; diff --git a/logging/jul/README.md b/logging/jul/README.md index 641317b9c52..97017e98df0 100644 --- a/logging/jul/README.md +++ b/logging/jul/README.md @@ -1,5 +1,8 @@ # Getting Started with Stackdriver Logging using `java.util.logging` + +Open in Cloud Shell + [Stackdriver Logging][logging] allows you to store, search, analyze, monitor, and alert on log data and events from Google Cloud Platform and Amazon Web Services. diff --git a/logging/jul/pom.xml b/logging/jul/pom.xml index 8ac8c19d7f7..8c480cbad3f 100644 --- a/logging/jul/pom.xml +++ b/logging/jul/pom.xml @@ -19,12 +19,14 @@ logging-google-cloud-samples-jul jar - + - com.google.cloud.logging.samples - cloud-logging-samples - 1.0.0 - .. + com.google.cloud.samples + shared-configuration + 1.0.8 diff --git a/logging/jul/src/main/java/com/example/logging/jul/Quickstart.java b/logging/jul/src/main/java/com/example/logging/jul/Quickstart.java index f75801f7f9a..85b18addd1a 100644 --- a/logging/jul/src/main/java/com/example/logging/jul/Quickstart.java +++ b/logging/jul/src/main/java/com/example/logging/jul/Quickstart.java @@ -1,18 +1,18 @@ /* - Copyright 2017 Google Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ + * Copyright 2017 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.example.logging.jul; diff --git a/logging/jul/src/main/resources/logging.properties b/logging/jul/src/main/resources/logging.properties index 684c3bdef18..1d7d0cf9f19 100644 --- a/logging/jul/src/main/resources/logging.properties +++ b/logging/jul/src/main/resources/logging.properties @@ -1,3 +1,18 @@ +# Copyright 2015 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + # A default java.util.logging configuration. # # [START jul_config] diff --git a/logging/logback/README.md b/logging/logback/README.md index d7dcaeb74ce..f4cb465d875 100644 --- a/logging/logback/README.md +++ b/logging/logback/README.md @@ -1,5 +1,8 @@ # Getting Started with Stackdriver Logging using Logback + +Open in Cloud Shell + [Stackdriver Logging][logging] allows you to store, search, analyze, monitor, and alert on log data and events from Google Cloud Platform and Amazon Web Services. diff --git a/logging/logback/pom.xml b/logging/logback/pom.xml index 8c69a0b9368..ebd115e87a5 100644 --- a/logging/logback/pom.xml +++ b/logging/logback/pom.xml @@ -19,12 +19,14 @@ logging-google-cloud-samples-logback jar - + - com.google.cloud.logging.samples - cloud-logging-samples - 1.0.0 - .. + com.google.cloud.samples + shared-configuration + 1.0.8 diff --git a/logging/logback/src/main/java/com/example/logging/logback/Quickstart.java b/logging/logback/src/main/java/com/example/logging/logback/Quickstart.java index d646cadcad0..bcbf5217852 100644 --- a/logging/logback/src/main/java/com/example/logging/logback/Quickstart.java +++ b/logging/logback/src/main/java/com/example/logging/logback/Quickstart.java @@ -1,22 +1,23 @@ /* - Copyright 2017 Google Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ + * Copyright 2017 Google Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.example.logging.logback; // [START logback_quickstart] + import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/logging/logback/src/main/java/com/example/logging/logback/enhancers/ExampleEnhancer.java b/logging/logback/src/main/java/com/example/logging/logback/enhancers/ExampleEnhancer.java index b99c82efe1f..95724dd44f9 100644 --- a/logging/logback/src/main/java/com/example/logging/logback/enhancers/ExampleEnhancer.java +++ b/logging/logback/src/main/java/com/example/logging/logback/enhancers/ExampleEnhancer.java @@ -15,7 +15,9 @@ */ package com.example.logging.logback.enhancers; + // [START logging_enhancer] + import com.google.cloud.logging.LogEntry; import com.google.cloud.logging.LoggingEnhancer; diff --git a/logging/pom.xml b/logging/pom.xml index 1d678a90d2e..cb86cb25e97 100644 --- a/logging/pom.xml +++ b/logging/pom.xml @@ -20,11 +20,14 @@ limitations under the License. cloud-logging-samples pom + - doc-samples - com.google.cloud - 1.0.0 - .. + com.google.cloud.samples + shared-configuration + 1.0.8 @@ -38,10 +41,4 @@ limitations under the License. cloud-client - - - junit - junit - - diff --git a/pom.xml b/pom.xml index b0c4e617a80..0a0338824f8 100644 --- a/pom.xml +++ b/pom.xml @@ -70,10 +70,7 @@ language/analysis language/cloud-client - - logging/cloud-client monitoring/cloud-client