trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject [3/3] trafficserver git commit: TS-2106 Added plugin names to all TSError messages. Removed extraneous newlines. This closes #220.
Date Tue, 23 Jun 2015 20:27:13 GMT
TS-2106 Added plugin names to all TSError messages. Removed extraneous newlines.
This closes #220.


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/28b243b0
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/28b243b0
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/28b243b0

Branch: refs/heads/master
Commit: 28b243b06a620c58a5b2a12b9575b58688e4e12f
Parents: 94476aa
Author: Jun Jie Ng <ngjunjie1991@gmail.com>
Authored: Thu Jun 11 21:37:32 2015 +0000
Committer: Alan M. Carroll <amc@apache.org>
Committed: Tue Jun 23 15:26:11 2015 -0500

----------------------------------------------------------------------
 ...gin-registration-and-version-checking.en.rst |   4 +-
 .../working-with-http-headers.en.rst            |  10 +-
 .../working-with-http-header-functions.en.rst   |   6 +-
 doc/sdk/remap-plugin/example-query-remap.en.rst |   2 +-
 doc/sdk/sample-source-code.en.rst               |  22 ++--
 example/add-header/add-header.c                 |  28 ++---
 example/append-transform/append-transform.c     |   8 +-
 example/basic-auth/basic-auth.c                 |  16 +--
 example/blacklist-0/blacklist-0.c               |  14 +--
 example/blacklist-1/blacklist-1.c               |  18 +--
 example/bnull-transform/bnull-transform.c       |   7 +-
 example/cache-scan/cache-scan.cc                |  14 +--
 example/file-1/file-1.c                         |   2 +-
 example/hello/hello.c                           |   2 +-
 example/lifecycle-plugin/lifecycle-plugin.c     |   7 +-
 example/null-transform/null-transform.c         |   7 +-
 example/output-header/output-header.c           |   9 +-
 example/protocol/Protocol.c                     |   9 +-
 example/protocol/TxnSM.c                        |   6 +-
 example/query-remap/query-remap.c               |   4 +-
 example/redirect-1/redirect-1.c                 |  12 +-
 example/remap/remap.cc                          |   2 +-
 example/remap_header_add/remap_header_add.cc    |   8 +-
 example/replace-header/replace-header.c         |   4 +-
 example/response-header-1/response-header-1.c   |  24 ++--
 example/secure-link/secure-link.c               |  10 +-
 example/server-transform/server-transform.c     |  26 ++---
 example/session-1/session-1.c                   |   5 +-
 example/thread-1/thread-1.c                     |   2 +-
 example/thread-pool/psi.c                       |   8 +-
 example/thread-pool/thread.c                    |   2 +-
 example/version/version.c                       |  14 ++-
 plugins/cacheurl/cacheurl.cc                    |  28 ++---
 plugins/conf_remap/conf_remap.cc                |  20 ++--
 .../ats_pagespeed/ats_base_fetch.cc             |   2 +-
 .../ats_pagespeed/ats_beacon_intercept.cc       |  22 ++--
 .../experimental/ats_pagespeed/ats_config.cc    |   5 +-
 .../ats_pagespeed/ats_header_utils.cc           |   2 +-
 .../experimental/ats_pagespeed/ats_pagespeed.cc |  16 +--
 .../ats_pagespeed/ats_resource_intercept.cc     |  10 +-
 .../background_fetch/background_fetch.cc        |  16 +--
 .../experimental/background_fetch/configs.cc    |  12 +-
 plugins/experimental/background_fetch/rules.cc  |   8 +-
 plugins/experimental/balancer/balancer.cc       |   4 +-
 plugins/experimental/balancer/hash.cc           |   2 +-
 plugins/experimental/balancer/roundrobin.cc     |   2 +-
 .../experimental/buffer_upload/buffer_upload.cc |  40 +++----
 .../experimental/cache_promote/cache_promote.cc |  10 +-
 .../cache_range_requests.cc                     |   4 +-
 .../collapsed_connection.cc                     |  20 ++--
 .../custom_redirect/custom_redirect.cc          |   6 +-
 plugins/experimental/epic/epic.cc               |   2 +-
 plugins/experimental/esi/esi.cc                 | 112 +++++++++----------
 .../esi/fetcher/HttpDataFetcherImpl.cc          |  18 +--
 plugins/experimental/esi/serverIntercept.cc     |  26 ++---
 plugins/experimental/geoip_acl/acl.cc           |  12 +-
 plugins/experimental/geoip_acl/geoip_acl.cc     |   4 +-
 .../experimental/healthchecks/healthchecks.c    |  14 +--
 plugins/experimental/hipes/hipes.cc             |   8 +-
 .../memcached_remap/memcached_remap.cc          |   6 +-
 plugins/experimental/metalink/metalink.cc       |   6 +-
 plugins/experimental/mysql_remap/mysql_remap.cc |  12 +-
 .../regex_revalidate/regex_revalidate.c         |   7 +-
 plugins/experimental/remap_stats/remap_stats.c  |   3 +-
 plugins/experimental/s3_auth/s3_auth.cc         |   8 +-
 plugins/experimental/sslheaders/sslheaders.cc   |   2 +-
 plugins/experimental/sslheaders/sslheaders.h    |   2 +-
 .../stale_while_revalidate.c                    |   5 +-
 plugins/experimental/ts_lua/ts_lua.c            |  16 +--
 .../experimental/ts_lua/ts_lua_client_request.c |   2 +-
 .../ts_lua/ts_lua_client_response.c             |   2 +-
 .../experimental/ts_lua/ts_lua_http_config.c    |   2 +-
 .../experimental/ts_lua/ts_lua_http_intercept.c |  10 +-
 plugins/experimental/ts_lua/ts_lua_log.c        |   8 +-
 plugins/experimental/ts_lua/ts_lua_package.c    |   4 +-
 .../experimental/ts_lua/ts_lua_server_request.c |   2 +-
 .../ts_lua/ts_lua_server_response.c             |   2 +-
 plugins/experimental/ts_lua/ts_lua_transform.c  |   2 +-
 plugins/experimental/ts_lua/ts_lua_util.c       |   6 +-
 plugins/experimental/url_sig/url_sig.c          |  12 +-
 plugins/experimental/xdebug/xdebug.cc           |   2 +-
 plugins/header_rewrite/condition.cc             |   2 +-
 plugins/header_rewrite/conditions.cc            |   8 +-
 plugins/header_rewrite/factory.cc               |   4 +-
 plugins/header_rewrite/header_rewrite.cc        |  16 +--
 plugins/header_rewrite/operators.cc             |  16 +--
 plugins/header_rewrite/parser.cc                |   4 +-
 plugins/header_rewrite/ruleset.cc               |   4 +-
 plugins/regex_remap/regex_remap.cc              |  28 ++---
 plugins/stats_over_http/stats_over_http.c       |   6 +-
 proxy/InkAPITest.cc                             |   6 +-
 91 files changed, 485 insertions(+), 467 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/doc/sdk/getting-started/plugin-registration-and-version-checking.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/getting-started/plugin-registration-and-version-checking.en.rst b/doc/sdk/getting-started/plugin-registration-and-version-checking.en.rst
index 10de7d7..17f5c24 100644
--- a/doc/sdk/getting-started/plugin-registration-and-version-checking.en.rst
+++ b/doc/sdk/getting-started/plugin-registration-and-version-checking.en.rst
@@ -72,11 +72,11 @@ ensures it's running with a compatible version of Traffic Server.
           info.support_email = "ts-api-support@MyCompany.com";
 
           if (!TSPluginRegister(&info)) {
-             TSError ("Plugin registration failed. \n");
+             TSError ("[plugin_name] Plugin registration failed.");
           }
 
           if (!check_ts_version()) {
-             TSError ("Plugin requires Traffic Server 2.0 or later\n");
+             TSError ("[plugin_name] Plugin requires Traffic Server 2.0 or later");
              return;
           }
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/doc/sdk/header-based-plugin-examples/basic-authorization-plugin/working-with-http-headers.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/header-based-plugin-examples/basic-authorization-plugin/working-with-http-headers.en.rst b/doc/sdk/header-based-plugin-examples/basic-authorization-plugin/working-with-http-headers.en.rst
index 9e26fe6..5198b4d 100644
--- a/doc/sdk/header-based-plugin-examples/basic-authorization-plugin/working-with-http-headers.en.rst
+++ b/doc/sdk/header-based-plugin-examples/basic-authorization-plugin/working-with-http-headers.en.rst
@@ -35,7 +35,7 @@ check the ``Proxy-Authorization`` field. The ``handle_dns`` routine uses
         char *user, *password;
 
         if (!TSHttpTxnClientReqGet (txnp, &bufp, &hdr_loc)) {
-            TSError ("couldn't retrieve client request header\n");
+            TSError ("[basic_authorization] Couldn't retrieve client request header");
             goto done;
         }
 
@@ -50,14 +50,14 @@ are present and valid:
 
     val = TSMimeHdrFieldValueStringGet (bufp, hdr_loc, field_loc, -1, &authval_length);
     if (!val) {
-        TSError ("no value in Proxy-Authorization field\n");
+        TSError ("[basic_authorization] No value in Proxy-Authorization field");
         TSHandleMLocRelease (bufp, hdr_loc, field_loc);
         TSHandleMLocRelease (bufp, TS_NULL_MLOC, hdr_loc);
         goto done;
     }
 
     if (strncmp (val, "Basic", 5) != 0) {
-        TSError ("no Basic auth type in Proxy-Authorization\n");
+        TSError ("[basic_authorization] No Basic auth type in Proxy-Authorization");
         TSHandleMLocRelease (bufp, hdr_loc, field_loc);
         TSHandleMLocRelease (bufp, TS_NULL_MLOC, hdr_loc);
         goto done;
@@ -71,7 +71,7 @@ are present and valid:
     user = base64_decode (val);
     password = strchr (user, ':');
     if (!password) {
-        TSError ("no password in authorization information\n");
+        TSError ("[basic_authorization] No password in authorization information");
         TSfree (user);
         TSHandleMLocRelease (bufp, hdr_loc, field_loc);
         TSHandleMLocRelease (bufp, TS_NULL_MLOC, hdr_loc);
@@ -81,7 +81,7 @@ are present and valid:
     password += 1;
 
     if (!authorized (user, password)) {
-        TSError ("%s:%s not authorized\n", user, password);
+        TSError ("[basic_authorization] %s:%s not authorized", user, password);
         TSfree (user);
         TSHandleMLocRelease (bufp, hdr_loc, field_loc);
         TSHandleMLocRelease (bufp, TS_NULL_MLOC, hdr_loc);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/doc/sdk/header-based-plugin-examples/blacklist-plugin/working-with-http-header-functions.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/header-based-plugin-examples/blacklist-plugin/working-with-http-header-functions.en.rst b/doc/sdk/header-based-plugin-examples/blacklist-plugin/working-with-http-header-functions.en.rst
index afe5e80..d5acad0 100644
--- a/doc/sdk/header-based-plugin-examples/blacklist-plugin/working-with-http-header-functions.en.rst
+++ b/doc/sdk/header-based-plugin-examples/blacklist-plugin/working-with-http-header-functions.en.rst
@@ -35,19 +35,19 @@ transaction. This is done in the ``handle_dns`` routine, using
    int host_length;
  
    if (TSHttpTxnClientReqGet(txnp, &bufp, &hdr_loc) != TS_SUCCESS) {
-      TSError("couldn't retrieve client request header\n");
+      TSError("[blacklist] Couldn't retrieve client request header");
       goto done;
    }
  
    if (TSHttpHdrUrlGet(bufp, hdr_loc, &url_loc) != TS_SUCCESS) {
-      TSError("couldn't retrieve request url\n");
+      TSError("[blacklist] Couldn't retrieve request url");
       TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
       goto done;
    }
  
    host = TSUrlHostGet(bufp, url_loc, &host_length);
    if (!host) {
-      TSError("couldn't retrieve request hostname\n");
+      TSError("[blacklist] couldn't retrieve request hostname");
       TSHandleMLocRelease(bufp, hdr_loc, url_loc);
       TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
       goto done;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/doc/sdk/remap-plugin/example-query-remap.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/remap-plugin/example-query-remap.en.rst b/doc/sdk/remap-plugin/example-query-remap.en.rst
index acf136a..9c359f4 100644
--- a/doc/sdk/remap-plugin/example-query-remap.en.rst
+++ b/doc/sdk/remap-plugin/example-query-remap.en.rst
@@ -108,7 +108,7 @@ modify the request host:
       query_remap_info *qri = (query_remap_info*)ih;
         
       if (!qri) {
-        TSError("NULL ihandle");
+        TSError("[remap] NULL ihandle");
         return 0;
       }
           

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/doc/sdk/sample-source-code.en.rst
----------------------------------------------------------------------
diff --git a/doc/sdk/sample-source-code.en.rst b/doc/sdk/sample-source-code.en.rst
index 11192a8..d216a6a 100644
--- a/doc/sdk/sample-source-code.en.rst
+++ b/doc/sdk/sample-source-code.en.rst
@@ -80,20 +80,20 @@ This plugin illustrates:
            int host_length;
 
            if (!TSHttpTxnClientReqGet (txnp, &bufp, &hdr_loc)) {
-               TSError ("couldn't retrieve client request header\n");
+               TSError ("[blacklist-1] Couldn't retrieve client request header");
                goto done;
            }
 
            url_loc = TSHttpHdrUrlGet (bufp, hdr_loc);
            if (!url_loc) {
-               TSError ("couldn't retrieve request url\n");
+               TSError ("[blacklist-1] Couldn't retrieve request url");
                TSHandleMLocRelease (bufp, TS_NULL_MLOC, hdr_loc);
                goto done;
            }
 
            host = TSUrlHostGet (bufp, url_loc, &host_length);
            if (!host) {
-               TSError ("couldn't retrieve request hostname\n");
+               TSError ("[blacklist-1] Couldn't retrieve request hostname");
                TSHandleMLocRelease (bufp, hdr_loc, url_loc);
                TSHandleMLocRelease (bufp, TS_NULL_MLOC, hdr_loc);
                goto done;
@@ -136,7 +136,7 @@ This plugin illustrates:
            int url_length;
 
            if (!TSHttpTxnClientRespGet (txnp, &bufp, &hdr_loc)) {
-               TSError ("couldn't retrieve client response header\n");
+               TSError ("[blacklist-1] Couldn't retrieve client response header");
                goto done;
            }
 
@@ -146,14 +146,14 @@ This plugin illustrates:
                strlen (TSHttpHdrReasonLookup (TS_HTTP_STATUS_FORBIDDEN)) );
 
            if (!TSHttpTxnClientReqGet (txnp, &bufp, &hdr_loc)) {
-               TSError ("couldn't retrieve client request header\n");
+               TSError ("[blacklist-1] Couldn't retrieve client request header");
                TSHandleMLocRelease (bufp, TS_NULL_MLOC, hdr_loc);
                goto done;
            }
 
            url_loc = TSHttpHdrUrlGet (bufp, hdr_loc);
            if (!url_loc) {
-               TSError ("couldn't retrieve request url\n");
+               TSError ("[blacklist-1] Couldn't retrieve request url");
                TSHandleMLocRelease (bufp, TS_NULL_MLOC, hdr_loc);
                goto done;
            }
@@ -207,8 +207,8 @@ This plugin illustrates:
 
                TSfclose (file);
            } else {
-              TSError ("unable to open %s\n", blacklist_file);
-              TSError ("all sites will be allowed\n", blacklist_file);
+              TSError ("[blacklist-1] Unable to open %s", blacklist_file);
+              TSError ("[blacklist-1] All sites will be allowed", blacklist_file);
            }
 
            TSMutexUnlock (sites_mutex);
@@ -272,12 +272,12 @@ This plugin illustrates:
            info.vendor_name = "DsCompany";
            info.support_email = "ts-api-support@DsCompany.com";
 
-           if (!TSPluginRegister (&info)) {
-               TSError ("Plugin registration failed.\n");
+           if (!TSPluginRegister(&info)) {
+               TSError ("[blacklist-1] Plugin registration failed.");
            }
 
            if (!check_ts_version()) {
-              TSError ("Plugin requires Traffic Server 2.0 or later\n");
+              TSError ("[blacklist-1] Plugin requires Traffic Server 2.0 or later");
               return;
            }
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/example/add-header/add-header.c
----------------------------------------------------------------------
diff --git a/example/add-header/add-header.c b/example/add-header/add-header.c
index e156a34..e2dd814 100644
--- a/example/add-header/add-header.c
+++ b/example/add-header/add-header.c
@@ -53,13 +53,13 @@ add_header(TSHttpTxn txnp, TSCont contp ATS_UNUSED)
   int retval;
 
   if (TSHttpTxnClientReqGet(txnp, &req_bufp, &req_loc) != TS_SUCCESS) {
-    TSError("[add_header] Error while retrieving client request header\n");
+    TSError("[add_header] Unable to retrieve client request header");
     goto done;
   }
 
   field_loc = TSMimeHdrFieldGet(hdr_bufp, hdr_loc, 0);
   if (field_loc == TS_NULL_MLOC) {
-    TSError("[add_header] Error while getting field");
+    TSError("[add_header] Unable to get field");
     goto error;
   }
 
@@ -67,7 +67,7 @@ add_header(TSHttpTxn txnp, TSCont contp ATS_UNUSED)
   while (field_loc) {
     /* First create a new field in the client request header */
     if (TSMimeHdrFieldCreate(req_bufp, req_loc, &new_field_loc) != TS_SUCCESS) {
-      TSError("[add_header] Error while creating new field");
+      TSError("[add_header] Unable to create new field");
       TSHandleMLocRelease(hdr_bufp, hdr_loc, field_loc);
       break;
     }
@@ -75,7 +75,7 @@ add_header(TSHttpTxn txnp, TSCont contp ATS_UNUSED)
     /* Then copy our new field at this new location */
     retval = TSMimeHdrFieldCopy(req_bufp, req_loc, new_field_loc, hdr_bufp, hdr_loc, field_loc);
     if (retval == TS_ERROR) {
-      TSError("[add_header] Error while copying new field");
+      TSError("[add_header] Unable to copy new field");
       TSHandleMLocRelease(hdr_bufp, hdr_loc, field_loc);
       break;
     }
@@ -83,7 +83,7 @@ add_header(TSHttpTxn txnp, TSCont contp ATS_UNUSED)
     /* Add this field to the Http client request header */
     retval = TSMimeHdrFieldAppend(req_bufp, req_loc, new_field_loc);
     if (retval != TS_SUCCESS) {
-      TSError("[add_header] Error while appending new field");
+      TSError("[add_header] Unable to append new field");
       TSHandleMLocRelease(hdr_bufp, hdr_loc, field_loc);
       break;
     }
@@ -132,30 +132,30 @@ TSPluginInit(int argc, const char *argv[])
   info.support_email = "ts-api-support@MyCompany.com";
 
   if (TSPluginRegister(&info) != TS_SUCCESS) {
-    TSError("[PluginInit] Plugin registration failed.\n");
+    TSError("[add_header] Plugin registration failed.");
     goto error;
   }
 
   if (argc < 2) {
-    TSError("[PluginInit] Usage: %s \"name1: value1\" \"name2: value2\" ...>\n", argv[0]);
+    TSError("[add_header] Usage: %s \"name1: value1\" \"name2: value2\" ...>", argv[0]);
     goto error;
   }
 
   hdr_bufp = TSMBufferCreate();
   if (TSMimeHdrCreate(hdr_bufp, &hdr_loc) != TS_SUCCESS) {
-    TSError("[PluginInit] Can not create mime header");
+    TSError("[add_header] Can not create mime header");
     goto error;
   }
 
   for (i = 1; i < argc; i++) {
     if (TSMimeHdrFieldCreate(hdr_bufp, hdr_loc, &field_loc) != TS_SUCCESS) {
-      TSError("[PluginInit] Error while creating field");
+      TSError("[add_header] Unable to create field");
       goto error;
     }
 
     retval = TSMimeHdrFieldAppend(hdr_bufp, hdr_loc, field_loc);
     if (retval != TS_SUCCESS) {
-      TSError("[PluginInit] Error while adding field");
+      TSError("[add_header] Unable to add field");
       goto error;
     }
 
@@ -163,7 +163,7 @@ TSPluginInit(int argc, const char *argv[])
     if (p) {
       retval = TSMimeHdrFieldNameSet(hdr_bufp, hdr_loc, field_loc, argv[i], p - argv[i]);
       if (retval == TS_ERROR) {
-        TSError("[PluginInit] Error while naming field");
+        TSError("[add_header] Unable to name field");
         goto error;
       }
 
@@ -173,13 +173,13 @@ TSPluginInit(int argc, const char *argv[])
       }
       retval = TSMimeHdrFieldValueStringInsert(hdr_bufp, hdr_loc, field_loc, -1, p, strlen(p));
       if (retval == TS_ERROR) {
-        TSError("[PluginInit] Error while inserting field value");
+        TSError("[add_header] Unable to insert field value");
         goto error;
       }
     } else {
       retval = TSMimeHdrFieldNameSet(hdr_bufp, hdr_loc, field_loc, argv[i], strlen(argv[i]));
       if (retval == TS_ERROR) {
-        TSError("[PluginInit] Error while inserting field value");
+        TSError("[add_header] Unable to set field name");
         goto error;
       }
     }
@@ -191,7 +191,7 @@ TSPluginInit(int argc, const char *argv[])
   goto done;
 
 error:
-  TSError("[PluginInit] Plugin not initialized");
+  TSError("[add_header] Plugin not initialized");
 
 done:
   return;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/example/append-transform/append-transform.c
----------------------------------------------------------------------
diff --git a/example/append-transform/append-transform.c b/example/append-transform/append-transform.c
index 6463556..386ece5 100644
--- a/example/append-transform/append-transform.c
+++ b/example/append-transform/append-transform.c
@@ -353,17 +353,17 @@ TSPluginInit(int argc, const char *argv[])
   info.support_email = "ts-api-support@MyCompany.com";
 
   if (TSPluginRegister(&info) != TS_SUCCESS) {
-    TSError("Plugin registration failed.\n");
+    TSError("[append-transform] Plugin registration failed.");
     goto Lerror;
   }
 
   if (argc != 2) {
-    TSError("usage: %s <filename>\n", argv[0]);
+    TSError("[append-transform] Usage: %s <filename>", argv[0]);
     goto Lerror;
   }
 
   if (!load(argv[1])) {
-    TSError("[append-transform] Could not load %s\n", argv[1]);
+    TSError("[append-transform] Could not load %s", argv[1]);
     goto Lerror;
   }
 
@@ -372,5 +372,5 @@ TSPluginInit(int argc, const char *argv[])
 
 Lerror:
 
-  TSError("[append-transform] Unable to initialize plugin\n");
+  TSError("[append-transform] Unable to initialize plugin");
 }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/example/basic-auth/basic-auth.c
----------------------------------------------------------------------
diff --git a/example/basic-auth/basic-auth.c b/example/basic-auth/basic-auth.c
index 2a95963..3afb8cd 100644
--- a/example/basic-auth/basic-auth.c
+++ b/example/basic-auth/basic-auth.c
@@ -97,20 +97,20 @@ handle_dns(TSHttpTxn txnp, TSCont contp)
   int authval_length;
 
   if (TSHttpTxnClientReqGet(txnp, &bufp, &hdr_loc) != TS_SUCCESS) {
-    TSError("couldn't retrieve client request header\n");
+    TSError("[basic_auth] Couldn't retrieve client request header");
     goto done;
   }
 
   field_loc = TSMimeHdrFieldFind(bufp, hdr_loc, TS_MIME_FIELD_PROXY_AUTHORIZATION, TS_MIME_LEN_PROXY_AUTHORIZATION);
   if (!field_loc) {
     TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
-    TSError("no Proxy-Authorization field\n");
+    TSError("[basic_auth] No Proxy-Authorization field");
     goto done;
   }
 
   val = TSMimeHdrFieldValueStringGet(bufp, hdr_loc, field_loc, -1, &authval_length);
   if (NULL == val) {
-    TSError("no value in Proxy-Authorization field\n");
+    TSError("[basic_auth] No value in Proxy-Authorization field");
     TSHandleMLocRelease(bufp, hdr_loc, field_loc);
     TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
     goto done;
@@ -118,7 +118,7 @@ handle_dns(TSHttpTxn txnp, TSCont contp)
 
   ptr = val;
   if (strncmp(ptr, "Basic", 5) != 0) {
-    TSError("no Basic auth type in Proxy-Authorization\n");
+    TSError("[basic_auth] No Basic auth type in Proxy-Authorization");
     TSHandleMLocRelease(bufp, hdr_loc, field_loc);
     TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
     goto done;
@@ -132,7 +132,7 @@ handle_dns(TSHttpTxn txnp, TSCont contp)
   user = base64_decode(ptr);
   password = strchr(user, ':');
   if (!password) {
-    TSError("no password in authorization information\n");
+    TSError("[basic_auth] No password in authorization information");
     TSfree(user);
     TSHandleMLocRelease(bufp, hdr_loc, field_loc);
     TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
@@ -142,7 +142,7 @@ handle_dns(TSHttpTxn txnp, TSCont contp)
   password += 1;
 
   if (!authorized(user, password)) {
-    TSError("%s:%s not authorized\n", user, password);
+    TSError("[basic_auth] %s:%s not authorized", user, password);
     TSfree(user);
     TSHandleMLocRelease(bufp, hdr_loc, field_loc);
     TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
@@ -170,7 +170,7 @@ handle_response(TSHttpTxn txnp)
   int len = strlen(insert);
 
   if (TSHttpTxnClientRespGet(txnp, &bufp, &hdr_loc) != TS_SUCCESS) {
-    TSError("couldn't retrieve client response header\n");
+    TSError("[basic_auth] Couldn't retrieve client response header");
     goto done;
   }
 
@@ -220,7 +220,7 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED)
   info.support_email = "ts-api-support@MyCompany.com";
 
   if (TSPluginRegister(&info) != TS_SUCCESS) {
-    TSError("Plugin registration failed.\n");
+    TSError("[basic_auth] Plugin registration failed.");
   }
 
   /* Build translation table */

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/example/blacklist-0/blacklist-0.c
----------------------------------------------------------------------
diff --git a/example/blacklist-0/blacklist-0.c b/example/blacklist-0/blacklist-0.c
index 1205d60..51850c5 100644
--- a/example/blacklist-0/blacklist-0.c
+++ b/example/blacklist-0/blacklist-0.c
@@ -48,19 +48,19 @@ handle_dns(TSHttpTxn txnp, TSCont contp)
   int host_length;
 
   if (TSHttpTxnClientReqGet(txnp, &bufp, &hdr_loc) != TS_SUCCESS) {
-    TSError("couldn't retrieve client request header\n");
+    TSError("[blacklist-0] Couldn't retrieve client request header");
     goto done;
   }
 
   if (TSHttpHdrUrlGet(bufp, hdr_loc, &url_loc) != TS_SUCCESS) {
-    TSError("couldn't retrieve request url\n");
+    TSError("[blacklist-0] Couldn't retrieve request url");
     TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
     goto done;
   }
 
   host = TSUrlHostGet(bufp, url_loc, &host_length);
   if (!host) {
-    TSError("couldn't retrieve request hostname\n");
+    TSError("[blacklist-0] Couldn't retrieve request hostname");
     TSHandleMLocRelease(bufp, hdr_loc, url_loc);
     TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
     goto done;
@@ -93,7 +93,7 @@ handle_response(TSHttpTxn txnp)
   int url_length;
 
   if (TSHttpTxnClientRespGet(txnp, &bufp, &hdr_loc) != TS_SUCCESS) {
-    TSError("couldn't retrieve client response header\n");
+    TSError("[blacklist-0] Couldn't retrieve client response header");
     goto done;
   }
 
@@ -102,13 +102,13 @@ handle_response(TSHttpTxn txnp)
                      strlen(TSHttpHdrReasonLookup(TS_HTTP_STATUS_FORBIDDEN)));
 
   if (TSHttpTxnClientReqGet(txnp, &bufp, &hdr_loc) != TS_SUCCESS) {
-    TSError("couldn't retrieve client request header\n");
+    TSError("[blacklist-0] Couldn't retrieve client request header");
     TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
     goto done;
   }
 
   if (!TSHttpHdrUrlGet(bufp, hdr_loc, &url_loc) != TS_SUCCESS) {
-    TSError("couldn't retrieve request url\n");
+    TSError("[blacklist-0] Couldn't retrieve request url");
     TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
     goto done;
   }
@@ -156,7 +156,7 @@ TSPluginInit(int argc, const char *argv[])
   info.support_email = "ts-api-support@MyCompany.com";
 
   if (TSPluginRegister(&info) != TS_SUCCESS) {
-    TSError("Plugin registration failed.\n");
+    TSError("[blacklist-0] Plugin registration failed.");
   }
 
   nsites = argc - 1;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/example/blacklist-1/blacklist-1.c
----------------------------------------------------------------------
diff --git a/example/blacklist-1/blacklist-1.c b/example/blacklist-1/blacklist-1.c
index cdaf0b6..e1c499e 100644
--- a/example/blacklist-1/blacklist-1.c
+++ b/example/blacklist-1/blacklist-1.c
@@ -75,19 +75,19 @@ handle_dns(TSHttpTxn txnp, TSCont contp)
   int host_length;
 
   if (TSHttpTxnClientReqGet(txnp, &bufp, &hdr_loc) != TS_SUCCESS) {
-    TSError("couldn't retrieve client request header\n");
+    TSError("[blacklist-1] Couldn't retrieve client request header");
     goto done;
   }
 
   if (TSHttpHdrUrlGet(bufp, hdr_loc, &url_loc) != TS_SUCCESS) {
-    TSError("couldn't retrieve request url\n");
+    TSError("[blacklist-1] Couldn't retrieve request url");
     TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
     goto done;
   }
 
   host = TSUrlHostGet(bufp, url_loc, &host_length);
   if (!host) {
-    TSError("couldn't retrieve request hostname\n");
+    TSError("[blacklist-1] Couldn't retrieve request hostname");
     TSHandleMLocRelease(bufp, hdr_loc, url_loc);
     TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
     goto done;
@@ -138,7 +138,7 @@ handle_response(TSHttpTxn txnp, TSCont contp ATS_UNUSED)
   int url_length;
 
   if (TSHttpTxnClientRespGet(txnp, &bufp, &hdr_loc) != TS_SUCCESS) {
-    TSError("couldn't retrieve client response header\n");
+    TSError("[blacklist-1] Couldn't retrieve client response header");
     goto done;
   }
 
@@ -147,13 +147,13 @@ handle_response(TSHttpTxn txnp, TSCont contp ATS_UNUSED)
                      strlen(TSHttpHdrReasonLookup(TS_HTTP_STATUS_FORBIDDEN)));
 
   if (TSHttpTxnClientReqGet(txnp, &bufp, &hdr_loc) != TS_SUCCESS) {
-    TSError("couldn't retrieve client request header\n");
+    TSError("[blacklist-1] Couldn't retrieve client request header");
     TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
     goto done;
   }
 
   if (TSHttpHdrUrlGet(bufp, hdr_loc, &url_loc) != TS_SUCCESS) {
-    TSError("couldn't retrieve request url\n");
+    TSError("[blacklist-1] Couldn't retrieve request url");
     TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
     goto done;
   }
@@ -214,8 +214,8 @@ read_blacklist(TSCont contp)
 
     TSfclose(file);
   } else {
-    TSError("unable to open %s\n", blacklist_file);
-    TSError("all sites will be allowed\n");
+    TSError("[blacklist-1] Unable to open %s", blacklist_file);
+    TSError("[blacklist-1] All sites will be allowed");
   }
 
   TSMutexUnlock(sites_mutex);
@@ -316,7 +316,7 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED)
   info.support_email = "ts-api-support@MyCompany.com";
 
   if (TSPluginRegister(&info) != TS_SUCCESS) {
-    TSError("Plugin registration failed.\n");
+    TSError("[blacklist-1] Plugin registration failed.");
   }
 
   /* create an TSTextLogObject to log blacklisted requests to */

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/example/bnull-transform/bnull-transform.c
----------------------------------------------------------------------
diff --git a/example/bnull-transform/bnull-transform.c b/example/bnull-transform/bnull-transform.c
index 778a146..563bfc0 100644
--- a/example/bnull-transform/bnull-transform.c
+++ b/example/bnull-transform/bnull-transform.c
@@ -270,7 +270,7 @@ transformable(TSHttpTxn txnp)
 
   if (TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc) == TS_ERROR) {
     TSError("[bnull-transform] Error releasing MLOC while checking "
-            "header status\n");
+            "header status");
   }
 
   return retv;
@@ -316,7 +316,8 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED)
   info.support_email = "ts-api-support@MyCompany.com";
 
   if (TSPluginRegister(&info) != TS_SUCCESS) {
-    TSError("[bnull-transform] Plugin registration failed.\n");
+    TSError("[bnull-transform] Plugin registration failed.");
+
     goto Lerror;
   }
 
@@ -327,5 +328,5 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED)
   return;
 
 Lerror:
-  TSError("[bnull-transform] Plugin disabled\n");
+  TSError("[bnull-transform] Plugin disabled");
 }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/example/cache-scan/cache-scan.cc
----------------------------------------------------------------------
diff --git a/example/cache-scan/cache-scan.cc b/example/cache-scan/cache-scan.cc
index ee1f04d..70e8d15 100644
--- a/example/cache-scan/cache-scan.cc
+++ b/example/cache-scan/cache-scan.cc
@@ -175,7 +175,7 @@ handle_scan(TSCont contp, TSEvent event, void *edata)
     return TS_CACHE_SCAN_RESULT_DONE;
   }
 
-  TSError("Unknown event in handle_scan: %d", event);
+  TSError("[cache-scan] Unknown event in handle_scan: %d", event);
   return -1;
 }
 
@@ -233,7 +233,7 @@ cleanup(TSCont contp)
 
     if (cstate->key_to_delete) {
       if (TSCacheKeyDestroy(cstate->key_to_delete) == TS_ERROR) {
-        TSError("failed to destroy cache key");
+        TSError("[cache-scan] Failed to destroy cache key");
       }
       cstate->key_to_delete = NULL;
     }
@@ -331,7 +331,7 @@ cache_intercept(TSCont contp, TSEvent event, void *edata)
     cleanup(contp);
     return 0;
   default:
-    TSError("Unknown event in cache_intercept: %d", event);
+    TSError("[cache-scan] Unknown event in cache_intercept: %d", event);
     cleanup(contp);
     return 0;
   }
@@ -387,13 +387,13 @@ setup_request(TSCont contp, TSHttpTxn txnp)
   TSAssert(contp == global_contp);
 
   if (TSHttpTxnClientReqGet(txnp, &bufp, &hdr_loc) != TS_SUCCESS) {
-    TSError("couldn't retrieve client request header");
+    TSError("[cache-scan] Couldn't retrieve client request header");
     TSHttpTxnReenable(txnp, TS_EVENT_HTTP_CONTINUE);
     return TS_SUCCESS;
   }
 
   if (TSHttpHdrUrlGet(bufp, hdr_loc, &url_loc) != TS_SUCCESS) {
-    TSError("couldn't retrieve request url");
+    TSError("[cache-scan] Couldn't retrieve request url");
     TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
     TSHttpTxnReenable(txnp, TS_EVENT_HTTP_CONTINUE);
     return TS_SUCCESS;
@@ -401,7 +401,7 @@ setup_request(TSCont contp, TSHttpTxn txnp)
 
   path = TSUrlPathGet(bufp, url_loc, &path_len);
   if (!path) {
-    TSError("couldn't retrieve request path");
+    TSError("[cache-scan] Couldn't retrieve request path");
     TSHandleMLocRelease(bufp, hdr_loc, url_loc);
     TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
     TSHttpTxnReenable(txnp, TS_EVENT_HTTP_CONTINUE);
@@ -441,7 +441,7 @@ setup_request(TSCont contp, TSHttpTxn txnp)
         TSUrlCreate(urlBuf, &urlLoc);
         if (TSUrlParse(urlBuf, urlLoc, (const char **)&start, end) != TS_PARSE_DONE ||
             TSCacheKeyDigestFromUrlSet(cstate->key_to_delete, urlLoc) != TS_SUCCESS) {
-          TSError("CacheKeyDigestFromUrlSet failed");
+          TSError("[cache-scan] CacheKeyDigestFromUrlSet failed");
           TSCacheKeyDestroy(cstate->key_to_delete);
           TSfree(cstate);
           TSHandleMLocRelease(urlBuf, NULL, urlLoc);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/example/file-1/file-1.c
----------------------------------------------------------------------
diff --git a/example/file-1/file-1.c b/example/file-1/file-1.c
index 88fecdf..b671599 100644
--- a/example/file-1/file-1.c
+++ b/example/file-1/file-1.c
@@ -49,7 +49,7 @@ TSPluginInit(int argc, const char *argv[])
   info.support_email = "ts-api-support@MyCompany.com";
 
   if (TSPluginRegister(&info) != TS_SUCCESS) {
-    TSError("Plugin registration failed.\n");
+    TSError("[file-1] Plugin registration failed.");
   }
 
   for (i = 1; i < argc; i++) {

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/example/hello/hello.c
----------------------------------------------------------------------
diff --git a/example/hello/hello.c b/example/hello/hello.c
index 5b248d7..94379e5 100644
--- a/example/hello/hello.c
+++ b/example/hello/hello.c
@@ -36,7 +36,7 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED)
   info.support_email = "ts-api-support@MyCompany.com";
 
   if (TSPluginRegister(&info) != TS_SUCCESS) {
-    TSError("Plugin registration failed. \n");
+    TSError("[hello-world] Plugin registration failed.");
   }
 
   TSDebug("debug-hello", "Hello World!\n");

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/example/lifecycle-plugin/lifecycle-plugin.c
----------------------------------------------------------------------
diff --git a/example/lifecycle-plugin/lifecycle-plugin.c b/example/lifecycle-plugin/lifecycle-plugin.c
index f98ac02..5cda67b 100644
--- a/example/lifecycle-plugin/lifecycle-plugin.c
+++ b/example/lifecycle-plugin/lifecycle-plugin.c
@@ -89,13 +89,14 @@ TSPluginInit(int argc, const char *argv[])
   info.support_email = "ts-api-support@MyCompany.com";
 
   if (TSPluginRegister(&info) != TS_SUCCESS) {
-    TSError("[lifecycle-plugin] Plugin registration failed.\n");
+    TSError("[lifecycle-plugin] Plugin registration failed.");
+
     goto Lerror;
   }
 
   if (!CheckVersion()) {
     TSError("[lifecycle-plugin] Plugin requires Traffic Server 3.3.5 "
-            "or later\n");
+            "or later");
     goto Lerror;
   }
 
@@ -110,5 +111,5 @@ TSPluginInit(int argc, const char *argv[])
   return;
 
 Lerror:
-  TSError("[amc-tranform] Unable to initialize plugin (disabled).\n");
+  TSError("[lifecycle-plugin] Unable to initialize plugin (disabled).");
 }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/example/null-transform/null-transform.c
----------------------------------------------------------------------
diff --git a/example/null-transform/null-transform.c b/example/null-transform/null-transform.c
index bbb428f..a4a5e72 100644
--- a/example/null-transform/null-transform.c
+++ b/example/null-transform/null-transform.c
@@ -265,7 +265,7 @@ transformable(TSHttpTxn txnp)
 
   if (TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc) == TS_ERROR) {
     TSError("[null-transform] Error releasing MLOC while checking "
-            "header status\n");
+            "header status");
   }
 
   TSDebug("null-transform", "Exiting transformable with return %d", retv);
@@ -314,7 +314,8 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED)
   info.support_email = "ts-api-support@MyCompany.com";
 
   if (TSPluginRegister(&info) != TS_SUCCESS) {
-    TSError("[null-transform] Plugin registration failed.\n");
+    TSError("[null-transform] Plugin registration failed.");
+
     goto Lerror;
   }
 
@@ -322,5 +323,5 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED)
   return;
 
 Lerror:
-  TSError("[null-tranform] Unable to initialize plugin (disabled).\n");
+  TSError("[null-transform] Unable to initialize plugin (disabled).");
 }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/example/output-header/output-header.c
----------------------------------------------------------------------
diff --git a/example/output-header/output-header.c b/example/output-header/output-header.c
index b619396..90db3b6 100644
--- a/example/output-header/output-header.c
+++ b/example/output-header/output-header.c
@@ -59,7 +59,7 @@ handle_dns(TSHttpTxn txnp, TSCont contp ATS_UNUSED)
 
   if (TSHttpTxnClientReqGet(txnp, &bufp, &hdr_loc) != TS_SUCCESS) {
     TSDebug(DEBUG_TAG, "couldn't retrieve client request header");
-    TSError("couldn't retrieve client request header\n");
+    TSError("[output_header] Couldn't retrieve client request header");
     goto done;
   }
 
@@ -73,7 +73,7 @@ handle_dns(TSHttpTxn txnp, TSCont contp ATS_UNUSED)
 
   if (TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc) == TS_ERROR) {
     TSDebug(DEBUG_TAG, "non-fatal: error releasing MLoc");
-    TSError("non-fatal: error releasing MLoc\n");
+    TSError("[output_header] non-fatal: Couldn't release MLoc");
   }
 
   /* Find out how the big the complete header is by
@@ -158,12 +158,13 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED)
   info.support_email = "ts-api-support@MyCompany.com";
 
   if (TSPluginRegister(&info) != TS_SUCCESS) {
-    TSError("[PluginInit] Plugin registration failed.\n");
+    TSError("[output_header] Plugin registration failed.");
+
     goto error;
   }
 
   TSHttpHookAdd(TS_HTTP_OS_DNS_HOOK, TSContCreate(hdr_plugin, NULL));
 
 error:
-  TSError("[PluginInit] Plugin not initialized");
+  TSError("[output_header] Plugin not initialized");
 }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/example/protocol/Protocol.c
----------------------------------------------------------------------
diff --git a/example/protocol/Protocol.c b/example/protocol/Protocol.c
index f2a2d5e..cf2e3b1 100644
--- a/example/protocol/Protocol.c
+++ b/example/protocol/Protocol.c
@@ -82,13 +82,13 @@ protocol_init(int accept_port, int server_port ATS_UNUSED)
   /* create customized log */
   ret_val = TSTextLogObjectCreate("protocol", TS_LOG_MODE_ADD_TIMESTAMP, &protocol_plugin_log);
   if (ret_val != TS_SUCCESS) {
-    TSError("failed to create log");
+    TSError("[protocol] Failed to create log");
   }
 
   /* format of the log entries, for caching_status, 1 for HIT and 0 for MISS */
   ret_val = TSTextLogObjectWrite(protocol_plugin_log, "timestamp filename servername caching_status\n\n");
   if (ret_val != TS_SUCCESS) {
-    TSError("failed to write into log");
+    TSError("[protocol] Failed to write into log");
   }
 
   contp = TSContCreate(accept_handler, TSMutexCreate());
@@ -112,7 +112,8 @@ TSPluginInit(int argc, const char *argv[])
   info.support_email = "ts-api-support@MyCompany.com";
 
   if (TSPluginRegister(&info) != TS_SUCCESS) {
-    TSError("[PluginInit] Plugin registration failed.\n");
+    TSError("[protocol] Plugin registration failed.");
+
     goto error;
   }
 
@@ -150,5 +151,5 @@ TSPluginInit(int argc, const char *argv[])
   protocol_init(accept_port, server_port);
 
 error:
-  TSError("[PluginInit] Plugin not initialized");
+  TSError("[protocol] Plugin not initialized");
 }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/example/protocol/TxnSM.c
----------------------------------------------------------------------
diff --git a/example/protocol/TxnSM.c b/example/protocol/TxnSM.c
index d9c2b29..8aff655 100644
--- a/example/protocol/TxnSM.c
+++ b/example/protocol/TxnSM.c
@@ -274,7 +274,7 @@ state_handle_cache_lookup(TSCont contp, TSEvent event, TSVConn vc)
     /* Write log */
     ret_val = TSTextLogObjectWrite(protocol_plugin_log, "%s %s %d \n", txn_sm->q_file_name, txn_sm->q_server_name, 1);
     if (ret_val != TS_SUCCESS)
-      TSError("fail to write into log");
+      TSError("[protocol] Fail to write into log");
 
     txn_sm->q_cache_vc = vc;
     txn_sm->q_pending_action = NULL;
@@ -306,7 +306,7 @@ state_handle_cache_lookup(TSCont contp, TSEvent event, TSVConn vc)
     ret_val = TSTextLogObjectWrite(protocol_plugin_log, "%s %s %d \n", txn_sm->q_file_name, txn_sm->q_server_name, 0);
 
     if (ret_val != TS_SUCCESS)
-      TSError("fail to write into log");
+      TSError("[protocol] Fail to write into log");
 
     set_handler(txn_sm->q_current_handler, (TxnSMHandler)&state_handle_cache_prepare_for_write);
     txn_sm->q_pending_action = TSCacheWrite(contp, txn_sm->q_key);
@@ -409,7 +409,7 @@ state_handle_cache_prepare_for_write(TSCont contp, TSEvent event, TSVConn vc)
     txn_sm->q_cache_vc = vc;
     break;
   default:
-    TSError("can't open cache write_vc, aborting txn");
+    TSError("[protocol] Can't open cache write_vc, aborting txn");
     txn_sm->q_cache_vc = NULL;
     return prepare_to_die(contp);
     break;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/example/query-remap/query-remap.c
----------------------------------------------------------------------
diff --git a/example/query-remap/query-remap.c b/example/query-remap/query-remap.c
index 6f5b0c8..ec6249f 100644
--- a/example/query-remap/query-remap.c
+++ b/example/query-remap/query-remap.c
@@ -59,7 +59,7 @@ TSRemapNewInstance(int argc, char *argv[], void **ih, char *errbuf ATS_UNUSED, i
   TSDebug(PLUGIN_NAME, "new instance fromURL: %s toURL: %s", argv[0], argv[1]);
 
   if (argc < 4) {
-    TSError("Missing parameters for " PLUGIN_NAME);
+    TSError("[query_remap] Missing parameters");
     return -1;
   }
 
@@ -118,7 +118,7 @@ TSRemapDoRemap(void *ih, TSHttpTxn rh ATS_UNUSED, TSRemapRequestInfo *rri)
   query_remap_info *qri = (query_remap_info *)ih;
 
   if (!qri || !rri) {
-    TSError(PLUGIN_NAME "NULL private data or RRI");
+    TSError("[query_remap] NULL private data or RRI");
     return TSREMAP_NO_REMAP;
   }
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/example/redirect-1/redirect-1.c
----------------------------------------------------------------------
diff --git a/example/redirect-1/redirect-1.c b/example/redirect-1/redirect-1.c
index d36f164..afedb06 100644
--- a/example/redirect-1/redirect-1.c
+++ b/example/redirect-1/redirect-1.c
@@ -139,19 +139,19 @@ handle_client_lookup(TSHttpTxn txnp, TSCont contp)
   }
 
   if (TSHttpTxnClientReqGet(txnp, &bufp, &hdr_loc) != TS_SUCCESS) {
-    TSError("couldn't retrieve client request header\n");
+    TSError("[redirect-1] Couldn't retrieve client request header");
     goto done;
   }
 
   if (TSHttpHdrUrlGet(bufp, hdr_loc, &url_loc) != TS_SUCCESS) {
-    TSError("couldn't retrieve request url\n");
+    TSError("[redirect-1] Couldn't retrieve request url");
     TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
     goto done;
   }
 
   host = TSUrlHostGet(bufp, url_loc, &host_length);
   if (!host) {
-    TSError("couldn't retrieve request hostname\n");
+    TSError("[redirect-1] Couldn't retrieve request hostname");
     TSHandleMLocRelease(bufp, hdr_loc, url_loc);
     TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
     goto done;
@@ -207,7 +207,7 @@ handle_response(TSHttpTxn txnp)
   char *tmp_body;
 
   if (TSHttpTxnClientRespGet(txnp, &bufp, &hdr_loc) != TS_SUCCESS) {
-    TSError("couldn't retrieve client response header\n");
+    TSError("[redirect-1] Couldn't retrieve client response header");
     goto done;
   }
 
@@ -346,7 +346,7 @@ TSPluginInit(int argc, const char *argv[])
   info.support_email = "ts-api-support@MyCompany.com";
 
   if (TSPluginRegister(&info) != TS_SUCCESS) {
-    TSError("Plugin registration failed.\n");
+    TSError("[redirect-1] Plugin registration failed.");
   }
 
   if (argc == 3) {
@@ -363,7 +363,7 @@ TSPluginInit(int argc, const char *argv[])
     TSstrlcat(uri_redirect, url_redirect, uri_len);
 
   } else {
-    TSError("Incorrect syntax in plugin.conf:  correct usage is"
+    TSError("[redirect-1] Incorrect syntax in plugin.conf:  correct usage is"
             "redirect-1.so ip_deny url_redirect");
     return;
   }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/example/remap/remap.cc
----------------------------------------------------------------------
diff --git a/example/remap/remap.cc b/example/remap/remap.cc
index fcf465b..931ba11 100644
--- a/example/remap/remap.cc
+++ b/example/remap/remap.cc
@@ -146,7 +146,7 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED)
   info.support_email = (char *)"";
 
   if (TSPluginRegister(&info) != TS_SUCCESS) {
-    TSError("Plugin registration failed. \n");
+    TSError("[remap] Plugin registration failed.");
   }
   TSDebug("debug-remap", "TSPluginInit: Remap plugin started\n");
 }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/example/remap_header_add/remap_header_add.cc
----------------------------------------------------------------------
diff --git a/example/remap_header_add/remap_header_add.cc b/example/remap_header_add/remap_header_add.cc
index 503089e..5e61929 100644
--- a/example/remap_header_add/remap_header_add.cc
+++ b/example/remap_header_add/remap_header_add.cc
@@ -96,7 +96,7 @@ TSRemapNewInstance(int argc, char *argv[], void **ih, NOWARN_UNUSED char *errbuf
   TSDebug(TAG, "TSRemapNewInstance()");
 
   if (!argv || !ih) {
-    TSError(TAG ": Unable to load plugin because missing argv or ih.");
+    TSError("[remap_header_add] Unable to load plugin because missing argv or ih.");
     return TS_ERROR;
   }
 
@@ -147,7 +147,7 @@ TSRemapDoRemap(void *ih, NOWARN_UNUSED TSHttpTxn txn, NOWARN_UNUSED TSRemapReque
   remap_line *rl = (remap_line *)ih;
 
   if (!rl || !rri) {
-    TSError(TAG ": rl or rri is null.");
+    TSError("[remap_header_add] rl or rri is null.");
     return TSREMAP_NO_REMAP;
   }
 
@@ -156,7 +156,7 @@ TSRemapDoRemap(void *ih, NOWARN_UNUSED TSHttpTxn txn, NOWARN_UNUSED TSRemapReque
   TSMBuffer req_bufp;
   TSMLoc req_loc;
   if (TSHttpTxnClientReqGet(txn, &req_bufp, &req_loc) != TS_SUCCESS) {
-    TSError(TAG ": Error while retrieving client request header");
+    TSError("[remap_header_add] Error while retrieving client request header");
     return TSREMAP_NO_REMAP;
   }
 
@@ -169,7 +169,7 @@ TSRemapDoRemap(void *ih, NOWARN_UNUSED TSHttpTxn txn, NOWARN_UNUSED TSRemapReque
       TSMimeHdrFieldAppend(req_bufp, req_loc, field_loc);
       TSMimeHdrFieldValueStringInsert(req_bufp, req_loc, field_loc, 0, rl->val[i], strlen(rl->val[i]));
     } else {
-      TSError(TAG ": Failure on TSMimeHdrFieldCreate");
+      TSError("[remap_header_add] Failure on TSMimeHdrFieldCreate");
     }
   }
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/example/replace-header/replace-header.c
----------------------------------------------------------------------
diff --git a/example/replace-header/replace-header.c b/example/replace-header/replace-header.c
index 8eb2622..189e1f8 100644
--- a/example/replace-header/replace-header.c
+++ b/example/replace-header/replace-header.c
@@ -47,7 +47,7 @@ replace_header(TSHttpTxn txnp)
   TSMLoc field_loc;
 
   if (TSHttpTxnServerRespGet(txnp, &resp_bufp, &resp_loc) != TS_SUCCESS) {
-    TSError("couldn't retrieve server response header.\n");
+    TSError("[replace_header] Couldn't retrieve server response header.");
     goto done;
   }
 
@@ -103,7 +103,7 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED)
   info.support_email = "ts-api-support@MyCompany.com";
 
   if (TSPluginRegister(&info) != TS_SUCCESS) {
-    TSError("Plugin registration failed. \n");
+    TSError("[replace_header] Plugin registration failed.");
   }
 
   TSHttpHookAdd(TS_HTTP_READ_RESPONSE_HDR_HOOK, TSContCreate(replace_header_plugin, NULL));

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/example/response-header-1/response-header-1.c
----------------------------------------------------------------------
diff --git a/example/response-header-1/response-header-1.c b/example/response-header-1/response-header-1.c
index 04e0c7e..016a20c 100644
--- a/example/response-header-1/response-header-1.c
+++ b/example/response-header-1/response-header-1.c
@@ -88,7 +88,7 @@ modify_header(TSHttpTxn txnp)
     return; /* caller reenables */
 
   if (TSHttpTxnServerRespGet(txnp, &resp_bufp, &resp_loc) != TS_SUCCESS) {
-    TSError("couldn't retrieve server response header\n");
+    TSError("[response_header-1] Couldn't retrieve server response header");
     return; /* caller reenables */
   }
 
@@ -136,8 +136,8 @@ modify_header(TSHttpTxn txnp)
 
     /* Get the cached HTTP header */
     if (TSHttpTxnCachedRespGet(txnp, &cached_bufp, &cached_loc) != TS_SUCCESS) {
-      TSError("STATUS 304, TSHttpTxnCachedRespGet():");
-      TSError("couldn't retrieve cached response header\n");
+      TSError("[response_header-1] STATUS 304, TSHttpTxnCachedRespGet():");
+      TSError("[response_header-1] Couldn't retrieve cached response header");
       TSHandleMLocRelease(resp_bufp, TS_NULL_MLOC, resp_loc);
       return; /* Caller reenables */
     }
@@ -145,7 +145,7 @@ modify_header(TSHttpTxn txnp)
     /* Get the cached MIME field name for this HTTP header */
     cached_field_loc = TSMimeHdrFieldFind(cached_bufp, cached_loc, (const char *)mimehdr1_name, strlen(mimehdr1_name));
     if (TS_NULL_MLOC == cached_field_loc) {
-      TSError("Can't find header %s in cached document", mimehdr1_name);
+      TSError("[response_header-1] Can't find header %s in cached document", mimehdr1_name);
       TSHandleMLocRelease(resp_bufp, TS_NULL_MLOC, resp_loc);
       TSHandleMLocRelease(cached_bufp, TS_NULL_MLOC, cached_loc);
       return; /* Caller reenables */
@@ -154,7 +154,7 @@ modify_header(TSHttpTxn txnp)
     /* Get the cached MIME value for this name in this HTTP header */
     chkptr = TSMimeHdrFieldValueStringGet(cached_bufp, cached_loc, cached_field_loc, -1, &chklength);
     if (NULL == chkptr || !chklength) {
-      TSError("Could not find value for cached MIME field name %s", mimehdr1_name);
+      TSError("[response_header-1] Could not find value for cached MIME field name %s", mimehdr1_name);
       TSHandleMLocRelease(resp_bufp, TS_NULL_MLOC, resp_loc);
       TSHandleMLocRelease(cached_bufp, TS_NULL_MLOC, cached_loc);
       TSHandleMLocRelease(cached_bufp, cached_loc, cached_field_loc);
@@ -239,14 +239,14 @@ TSPluginInit(int argc, const char *argv[])
   info.support_email = "ts-api-support@MyCompany.com";
 
   if (TSPluginRegister(&info) != TS_SUCCESS) {
-    TSError("Plugin registration failed.\n");
+    TSError("[response_header-1] Plugin registration failed.");
   }
 
   init_buffer_status = 0;
   if (argc > 1) {
-    TSError("usage: %s \n", argv[0]);
-    TSError("warning: too many args %d\n", argc);
-    TSError("warning: ignoring unused arguments beginning with %s\n", argv[1]);
+    TSError("[response_header-1] usage: %s", argv[0]);
+    TSError("[response_header-1] warning: too many args %d", argc);
+    TSError("[response_header-1] warning: ignoring unused arguments beginning with %s", argv[1]);
   }
 
   /*
@@ -287,12 +287,12 @@ TSPluginInit(int argc, const char *argv[])
    */
 
   if (TS_NULL_MLOC == (chk_field_loc = TSMimeHdrFieldGet(hdr_bufp, hdr_loc, 0))) {
-    TSError("couldn't retrieve header field from init buffer");
-    TSError("marking init buffer as corrupt; no more plugin processing");
+    TSError("[response_header-1] Couldn't retrieve header field from init buffer");
+    TSError("[response_header-1] Marking init buffer as corrupt; no more plugin processing");
     init_buffer_status = 0;
     /* bail out here and reenable transaction */
   } else {
     if (field_loc != chk_field_loc)
-      TSError("retrieved buffer field loc is %p when it should be %p", chk_field_loc, field_loc);
+      TSError("[response_header-1] Retrieved buffer field loc is %p when it should be %p", chk_field_loc, field_loc);
   }
 }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/example/secure-link/secure-link.c
----------------------------------------------------------------------
diff --git a/example/secure-link/secure-link.c b/example/secure-link/secure-link.c
index 04da8b3..3e6646f 100644
--- a/example/secure-link/secure-link.c
+++ b/example/secure-link/secure-link.c
@@ -72,19 +72,19 @@ TSRemapDoRemap(void *ih, TSHttpTxn rh, TSRemapRequestInfo *rri)
             expire = TSstrdup(val);
           }
         } else {
-          TSError("Invalid parameter [%s]", ptr);
+          TSError("[secure_link] Invalid parameter [%s]", ptr);
           break;
         }
       } while ((ptr = strtok_r(NULL, "&", &saveptr)) != NULL);
     } else {
-      TSError("strtok didn't find a & in the query string");
+      TSError("[secure_link] strtok didn't find a & in the query string");
       /* this is just example, so set fake params to prevent plugin crash */
       token = TSstrdup("d41d8cd98f00b204e9800998ecf8427e");
       expire = TSstrdup("00000000");
     }
     TSfree(s);
   } else {
-    TSError("TSUrlHttpQueryGet returns empty value");
+    TSError("[secure_link] TSUrlHttpQueryGet returns empty value");
   }
 
   ph = TSUrlPathGet(rri->requestBufp, rri->requestUrl, &len);
@@ -96,7 +96,7 @@ TSRemapDoRemap(void *ih, TSHttpTxn rh, TSRemapRequestInfo *rri)
     path = TSstrdup(s);
     TSfree(s);
   } else {
-    TSError("TSUrlPathGet returns empty value");
+    TSError("[secure_link] TSUrlPathGet returns empty value");
     /* this is just example, so set fake params to prevent plugin crash */
     path = TSstrdup("example/");
   }
@@ -172,7 +172,7 @@ TSRemapNewInstance(int argc, char **argv, void **ih, char *errbuf, int errbuf_si
         TSDebug(PLUGIN_NAME, "Unknown parameter [%s]", argv[i]);
       }
     } else {
-      TSError("Invalid parameter [%s]", argv[i]);
+      TSError("[secure_link] Invalid parameter [%s]", argv[i]);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/example/server-transform/server-transform.c
----------------------------------------------------------------------
diff --git a/example/server-transform/server-transform.c b/example/server-transform/server-transform.c
index c802a58..c3fef62 100644
--- a/example/server-transform/server-transform.c
+++ b/example/server-transform/server-transform.c
@@ -137,7 +137,7 @@ transform_destroy(TSCont contp)
 
     TSfree(data);
   } else {
-    TSError("Unable to get Continuation's Data. TSContDataGet returns NULL");
+    TSError("[server_transform] Unable to get Continuation's Data. TSContDataGet returns NULL");
   }
 
   TSContDestroy(contp);
@@ -179,7 +179,7 @@ transform_connect(TSCont contp, TransformData *data)
       data->input_reader = tempReader;
     }
   } else {
-    TSError("TSIOBufferReaderAvail returns TS_ERROR");
+    TSError("[server_transform] TSIOBufferReaderAvail returns TS_ERROR");
     return 0;
   }
 
@@ -210,7 +210,7 @@ transform_write(TSCont contp, TransformData *data)
   if (content_length >= 0) {
     data->server_vio = TSVConnWrite(data->server_vc, contp, TSIOBufferReaderClone(data->input_reader), content_length);
   } else {
-    TSError("TSIOBufferReaderAvail returns TS_ERROR");
+    TSError("[server_transform] TSIOBufferReaderAvail returns TS_ERROR");
   }
   return 0;
 }
@@ -225,7 +225,7 @@ transform_read_status(TSCont contp, TransformData *data)
   if (data->output_reader != NULL) {
     data->server_vio = TSVConnRead(data->server_vc, contp, data->output_buf, sizeof(int));
   } else {
-    TSError("Error in Allocating a Reader to output buffer. TSIOBufferReaderAlloc returns NULL");
+    TSError("[server_transform] Error in Allocating a Reader to output buffer. TSIOBufferReaderAlloc returns NULL");
   }
 
   return 0;
@@ -243,11 +243,11 @@ transform_read(TSCont contp, TransformData *data)
   data->server_vio = TSVConnRead(data->server_vc, contp, data->output_buf, data->content_length);
   data->output_vc = TSTransformOutputVConnGet((TSVConn)contp);
   if (data->output_vc == NULL) {
-    TSError("TSTransformOutputVConnGet returns NULL");
+    TSError("[server_transform] TSTransformOutputVConnGet returns NULL");
   } else {
     data->output_vio = TSVConnWrite(data->output_vc, contp, data->output_reader, data->content_length);
     if (data->output_vio == NULL) {
-      TSError("TSVConnWrite returns NULL");
+      TSError("[server_transform] TSVConnWrite returns NULL");
     }
   }
 
@@ -274,11 +274,11 @@ transform_bypass(TSCont contp, TransformData *data)
   TSIOBufferReaderConsume(data->input_reader, sizeof(int));
   data->output_vc = TSTransformOutputVConnGet((TSVConn)contp);
   if (data->output_vc == NULL) {
-    TSError("TSTransformOutputVConnGet returns NULL");
+    TSError("[server_transform] TSTransformOutputVConnGet returns NULL");
   } else {
     data->output_vio = TSVConnWrite(data->output_vc, contp, data->input_reader, TSIOBufferReaderAvail(data->input_reader));
     if (data->output_vio == NULL) {
-      TSError("TSVConnWrite returns NULL");
+      TSError("[server_transform] TSVConnWrite returns NULL");
     }
   }
   return 1;
@@ -515,7 +515,7 @@ transform_handler(TSCont contp, TSEvent event, void *edata)
 
     data = (TransformData *)TSContDataGet(contp);
     if (data == NULL) {
-      TSError("Didn't get Continuation's Data. Ignoring Event..");
+      TSError("[server_transform] Didn't get Continuation's Data. Ignoring Event..");
       return 0;
     }
     TSDebug("strans", "transform handler event [%d], data->state = [%d]", event, data->state);
@@ -583,19 +583,19 @@ server_response_ok(TSHttpTxn txnp)
   TSHttpStatus resp_status;
 
   if (TSHttpTxnServerRespGet(txnp, &bufp, &hdr_loc) != TS_SUCCESS) {
-    TSError("Unable to get handle to Server Response");
+    TSError("[server_transform] Unable to get handle to Server Response");
     return 0;
   }
 
   resp_status = TSHttpHdrStatusGet(bufp, hdr_loc);
   if (TS_HTTP_STATUS_OK == resp_status) {
     if (TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc) != TS_SUCCESS) {
-      TSError("Unable to release handle to server request");
+      TSError("[server_transform] Unable to release handle to server request");
     }
     return 1;
   } else {
     if (TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc) != TS_SUCCESS) {
-      TSError("Unable to release handle to server request");
+      TSError("[server_transform] Unable to release handle to server request");
     }
     return 0;
   }
@@ -643,7 +643,7 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED)
   info.support_email = "ts-api-support@MyCompany.com";
 
   if (TSPluginRegister(&info) != TS_SUCCESS) {
-    TSError("Plugin registration failed.\n");
+    TSError("[server_transform] Plugin registration failed.");
   }
 
   /* connect to the echo port on localhost */

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/example/session-1/session-1.c
----------------------------------------------------------------------
diff --git a/example/session-1/session-1.c b/example/session-1/session-1.c
index 201cd27..8f51c8a 100644
--- a/example/session-1/session-1.c
+++ b/example/session-1/session-1.c
@@ -98,7 +98,8 @@ TSPluginInit(int argc, const char *argv[])
   info.support_email = "ts-api-support@MyCompany.com";
 
   if (TSPluginRegister(&info) != TS_SUCCESS) {
-    TSError("[PluginInit] Plugin registration failed.\n");
+    TSError("[session-1] Plugin registration failed.\n");
+
     goto error;
   }
 
@@ -110,5 +111,5 @@ TSPluginInit(int argc, const char *argv[])
   TSHttpHookAdd(TS_HTTP_SSN_START_HOOK, contp);
 
 error:
-  TSError("[PluginInit] Plugin not initialized");
+  TSError("[session-1] Plugin not initialized");
 }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/example/thread-1/thread-1.c
----------------------------------------------------------------------
diff --git a/example/thread-1/thread-1.c b/example/thread-1/thread-1.c
index a29678b..a9be7f5 100644
--- a/example/thread-1/thread-1.c
+++ b/example/thread-1/thread-1.c
@@ -75,7 +75,7 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED)
   info.support_email = "ts-api-support@MyCompany.com";
 
   if (TSPluginRegister(&info) != TS_SUCCESS) {
-    TSError("Plugin registration failed.\n");
+    TSError("[thread-1] Plugin registration failed.");
   }
 
   TSHttpHookAdd(TS_HTTP_OS_DNS_HOOK, TSContCreate(thread_plugin, NULL));

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/example/thread-pool/psi.c
----------------------------------------------------------------------
diff --git a/example/thread-pool/psi.c b/example/thread-pool/psi.c
index 9a47ef0..f924659 100644
--- a/example/thread-pool/psi.c
+++ b/example/thread-pool/psi.c
@@ -897,7 +897,7 @@ transformable(TSHttpTxn txnp)
 
   field_loc = TSMimeHdrFieldFind(bufp, hdr_loc, TS_MIME_FIELD_CONTENT_TYPE, -1);
   if (field_loc == TS_NULL_MLOC) {
-    TSError("[transformable] Error while searching Content-Type field");
+    TSError("[psi] Unable to search Content-Type field");
     TSHandleMLocRelease(bufp, TS_NULL_MLOC, hdr_loc);
     return 0;
   }
@@ -998,7 +998,7 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED)
   info.support_email = "";
 
   if (TSPluginRegister(&info) != TS_SUCCESS) {
-    TSError("Plugin registration failed.\n");
+    TSError("[psi] Plugin registration failed.");
   }
 
   /* Initialize the psi directory = <plugin_path>/include */
@@ -1007,7 +1007,7 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED)
   /* create an TSTextLogObject to log any psi include */
   retval = TSTextLogObjectCreate("psi", TS_LOG_MODE_ADD_TIMESTAMP, &log);
   if (retval == TS_ERROR) {
-    TSError("Failed creating log for psi plugin");
+    TSError("[psi] Failed creating log for psi plugin");
     log = NULL;
   }
 
@@ -1019,7 +1019,7 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED)
     char *thread_name = (char *)TSmalloc(64);
     sprintf(thread_name, "Thread[%d]", i);
     if (!TSThreadCreate((TSThreadFunc)thread_loop, thread_name)) {
-      TSError("[TSPluginInit] Error while creating threads");
+      TSError("[psi] Failed creating threads");
       return;
     }
   }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/example/thread-pool/thread.c
----------------------------------------------------------------------
diff --git a/example/thread-pool/thread.c b/example/thread-pool/thread.c
index 702676f..544c6b2 100644
--- a/example/thread-pool/thread.c
+++ b/example/thread-pool/thread.c
@@ -79,7 +79,7 @@ add_to_queue(Queue *q, void *data)
     TSMutexUnlock(q->mutex);
 
     if (n > MAX_JOBS_ALARM) {
-      TSError("Warning:Too many jobs in plugin thread pool queue (%d). Maximum allowed is %d", n, MAX_JOBS_ALARM);
+      TSError("[thread_pool] Warning:Too many jobs in plugin thread pool queue (%d). Maximum allowed is %d", n, MAX_JOBS_ALARM);
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/example/version/version.c
----------------------------------------------------------------------
diff --git a/example/version/version.c b/example/version/version.c
index 292a090..ee249b9 100644
--- a/example/version/version.c
+++ b/example/version/version.c
@@ -35,7 +35,7 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED)
   const char *ts_version = TSTrafficServerVersionGet();
 
   if (!ts_version) {
-    TSError("Can't get Traffic Server verion.\n");
+    TSError("[version] Can't get Traffic Server verion.\n");
     return;
   }
 
@@ -45,7 +45,7 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED)
   int patch_ts_version = 0;
 
   if (sscanf(ts_version, "%d.%d.%d", &major_ts_version, &minor_ts_version, &patch_ts_version) != 3) {
-    TSError("Can't extract verions.\n");
+    TSError("[version] Can't extract verions.\n");
     return;
   }
 
@@ -54,8 +54,16 @@ TSPluginInit(int argc ATS_UNUSED, const char *argv[] ATS_UNUSED)
   info.support_email = "ts-api-support@MyCompany.com";
 
 
+// partial compilation
+#if (TS_VERSION_NUMBER < 3000000)
+  if (TSPluginRegister(TS_SDK_VERSION_2_0, &info) != TS_SUCCESS) {
+#elif (TS_VERSION_NUMBER < 6000000)
+  if (TSPluginRegister(TS_SDK_VERSION_3_0, &info) != TS_SUCCESS) {
+#else
   if (TSPluginRegister(&info) != TS_SUCCESS) {
-    TSError("Plugin registration failed. \n");
+#endif
+    TSError("[version] Plugin registration failed. \n");
+
   }
 
   TSDebug("debug-version-plugin", "Running in Apache Traffic Server: v%d.%d.%d\n", major_ts_version, minor_ts_version,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/plugins/cacheurl/cacheurl.cc
----------------------------------------------------------------------
diff --git a/plugins/cacheurl/cacheurl.cc b/plugins/cacheurl/cacheurl.cc
index 6cfef24..2c3d96b 100644
--- a/plugins/cacheurl/cacheurl.cc
+++ b/plugins/cacheurl/cacheurl.cc
@@ -87,7 +87,7 @@ regex_substitute(char **buf, char *str, regex_info *info)
     case PCRE_ERROR_NOMATCH:
       break;
     default:
-      TSError("[%s] Matching error: %d\n", PLUGIN_NAME, matchcount);
+      TSError("[%s] Matching error: %d", PLUGIN_NAME, matchcount);
       break;
     }
     return 0;
@@ -96,7 +96,7 @@ regex_substitute(char **buf, char *str, regex_info *info)
   /* Verify the replacement has the right number of matching groups */
   for (i = 0; i < info->tokcount; i++) {
     if (info->tokens[i] >= matchcount) {
-      TSError("[%s] Invalid reference int replacement: $%d\n", PLUGIN_NAME, info->tokens[i]);
+      TSError("[%s] Invalid reference int replacement: $%d", PLUGIN_NAME, info->tokens[i]);
       return 0;
     }
   }
@@ -143,7 +143,7 @@ regex_compile(regex_info **buf, char *pattern, char *replacement)
   /* Precompile the regular expression */
   info->re = pcre_compile(pattern, 0, &reerror, &reerroffset, NULL);
   if (!info->re) {
-    TSError("[%s] Compilation of regex '%s' failed at char %d: %s\n", PLUGIN_NAME, pattern, reerroffset, reerror);
+    TSError("[%s] Compilation of regex '%s' failed at char %d: %s", PLUGIN_NAME, pattern, reerroffset, reerror);
     status = 0;
   }
 
@@ -156,12 +156,12 @@ regex_compile(regex_info **buf, char *pattern, char *replacement)
       if (replacement[i] == '$') {
         if (tokcount >= TOKENCOUNT) {
           TSError("[%s] Error: too many tokens in replacement "
-                  "string: %s\n",
+                  "string: %s",
                   PLUGIN_NAME, replacement);
           status = 0;
           break;
         } else if (replacement[i + 1] < '0' || replacement[i + 1] > '9') {
-          TSError("[%s] Error: Invalid replacement token $%c in %s: should be $0 - $9\n", PLUGIN_NAME, replacement[i + 1],
+          TSError("[%s] Error: Invalid replacement token $%c in %s: should be $0 - $9", PLUGIN_NAME, replacement[i + 1],
                   replacement);
           status = 0;
           break;
@@ -231,7 +231,7 @@ load_config_file(const char *config_file)
   fh = TSfopen(path.c_str(), "r");
 
   if (!fh) {
-    TSError("[%s] Unable to open %s. No patterns will be loaded\n", PLUGIN_NAME, path.c_str());
+    TSError("[%s] Unable to open %s. No patterns will be loaded", PLUGIN_NAME, path.c_str());
     return NULL;
   }
 
@@ -261,7 +261,7 @@ load_config_file(const char *config_file)
       spstart = strstr(buffer, "\t");
     }
     if (!spstart) {
-      TSError("[%s] ERROR: Invalid format on line %d. Skipping\n", PLUGIN_NAME, lineno);
+      TSError("[%s] ERROR: Invalid format on line %d. Skipping", PLUGIN_NAME, lineno);
       TSfclose(fh);
       return NULL;
     }
@@ -272,7 +272,7 @@ load_config_file(const char *config_file)
     }
     if (*spend == 0) {
       /* We reached the end of the string without any non-whitepace */
-      TSError("[%s] ERROR: Invalid format on line %d. Skipping\n", PLUGIN_NAME, lineno);
+      TSError("[%s] ERROR: Invalid format on line %d. Skipping", PLUGIN_NAME, lineno);
       TSfclose(fh);
       return NULL;
     }
@@ -284,7 +284,7 @@ load_config_file(const char *config_file)
     TSDebug(PLUGIN_NAME, "Adding pattern/replacement pair: '%s' -> '%s'", buffer, spend);
     retval = regex_compile(&info, buffer, spend);
     if (!retval) {
-      TSError("[%s] Error precompiling regex/replacement. Skipping.\n", PLUGIN_NAME);
+      TSError("[%s] Error precompiling regex/replacement. Skipping.", PLUGIN_NAME);
       TSfclose(fh);
       return NULL;
     }
@@ -294,7 +294,7 @@ load_config_file(const char *config_file)
   TSfclose(fh);
 
   if (prl->pr.empty()) {
-    TSError("[%s] No regular expressions loaded.\n", PLUGIN_NAME);
+    TSError("[%s] No regular expressions loaded.", PLUGIN_NAME);
   }
 
   TSDebug(PLUGIN_NAME, "loaded %u regexes", (unsigned)prl->pr.size());
@@ -312,7 +312,7 @@ rewrite_cacheurl(pr_list *prl, TSHttpTxn txnp)
 
   url = TSHttpTxnEffectiveUrlStringGet(txnp, &url_length);
   if (!url) {
-    TSError("[%s] couldn't retrieve request url\n", PLUGIN_NAME);
+    TSError("[%s] couldn't retrieve request url", PLUGIN_NAME);
     ok = 0;
   }
 
@@ -328,7 +328,7 @@ rewrite_cacheurl(pr_list *prl, TSHttpTxn txnp)
       TSDebug(PLUGIN_NAME, "Rewriting cache URL for %s to %s", url, newurl);
       if (TSCacheUrlSet(txnp, newurl, strlen(newurl)) != TS_SUCCESS) {
         TSError("[%s] Unable to modify cache url from "
-                "%s to %s\n",
+                "%s to %s",
                 PLUGIN_NAME, url, newurl);
         ok = 0;
       }
@@ -371,8 +371,8 @@ handle_hook(TSCont contp, TSEvent event, void *edata)
 static void
 initialization_error(const char *msg)
 {
-  TSError("[%s] %s\n", PLUGIN_NAME, msg);
-  TSError("[%s] Unable to initialize plugin (disabled).\n", PLUGIN_NAME);
+  TSError("[%s] %s", PLUGIN_NAME, msg);
+  TSError("[%s] Unable to initialize plugin (disabled).", PLUGIN_NAME);
 }
 
 TSReturnCode

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/plugins/conf_remap/conf_remap.cc
----------------------------------------------------------------------
diff --git a/plugins/conf_remap/conf_remap.cc b/plugins/conf_remap/conf_remap.cc
index a6281aa..ebf61b4 100644
--- a/plugins/conf_remap/conf_remap.cc
+++ b/plugins/conf_remap/conf_remap.cc
@@ -90,7 +90,7 @@ RemapConfigs::parse_inline(const char *arg)
   value = std::string(sep + 1, std::distance(sep + 1, arg + strlen(arg)));
 
   if (TSHttpTxnConfigFind(key.c_str(), -1 /* len */, &name, &type) != TS_SUCCESS) {
-    TSError("%s: invalid configuration variable '%s'", PLUGIN_NAME, key.c_str());
+    TSError("[%s] Invalid configuration variable '%s'", PLUGIN_NAME, key.c_str());
     return false;
   }
 
@@ -108,7 +108,7 @@ RemapConfigs::parse_inline(const char *arg)
     }
     break;
   default:
-    TSError("%s: configuration variable '%s' is of an unsupported type", PLUGIN_NAME, key.c_str());
+    TSError("[%s] Configuration variable '%s' is of an unsupported type", PLUGIN_NAME, key.c_str());
     return false;
   }
 
@@ -144,7 +144,7 @@ RemapConfigs::parse_file(const char *filename)
   }
 
   if (NULL == (file = TSfopen(path.c_str(), "r"))) {
-    TSError("%s: could not open config file %s", PLUGIN_NAME, path.c_str());
+    TSError("[%s] Could not open config file %s", PLUGIN_NAME, path.c_str());
     return false;
   }
 
@@ -164,26 +164,26 @@ RemapConfigs::parse_file(const char *filename)
       continue;
 
     if (strncmp(tok, "CONFIG", 6)) {
-      TSError("%s: file %s, line %d: non-CONFIG line encountered", PLUGIN_NAME, path.c_str(), line_num);
+      TSError("[%s] File %s, line %d: non-CONFIG line encountered", PLUGIN_NAME, path.c_str(), line_num);
       continue;
     }
 
     // Find the configuration name
     tok = strtok_r(NULL, " \t", &ln);
     if (TSHttpTxnConfigFind(tok, -1, &name, &expected_type) != TS_SUCCESS) {
-      TSError("%s: file %s, line %d: no records.config name given", PLUGIN_NAME, path.c_str(), line_num);
+      TSError("[%s] File %s, line %d: no records.config name given", PLUGIN_NAME, path.c_str(), line_num);
       continue;
     }
 
     // Find the type (INT or STRING only)
     tok = strtok_r(NULL, " \t", &ln);
     if (TS_RECORDDATATYPE_NULL == (type = str_to_datatype(tok))) {
-      TSError("%s: file %s, line %d: only INT and STRING types supported", PLUGIN_NAME, path.c_str(), line_num);
+      TSError("[%s] file %s, line %d: only INT and STRING types supported", PLUGIN_NAME, path.c_str(), line_num);
       continue;
     }
 
     if (type != expected_type) {
-      TSError("%s: file %s, line %d: mismatch between provide data type, and expected type", PLUGIN_NAME, path.c_str(), line_num);
+      TSError("[%s] file %s, line %d: mismatch between provide data type, and expected type", PLUGIN_NAME, path.c_str(), line_num);
       continue;
     }
 
@@ -207,7 +207,7 @@ RemapConfigs::parse_file(const char *filename)
       tok = NULL;
     }
     if (!tok) {
-      TSError("%s: file %s, line %d: the configuration must provide a value", PLUGIN_NAME, path.c_str(), line_num);
+      TSError("[%s] file %s, line %d: the configuration must provide a value", PLUGIN_NAME, path.c_str(), line_num);
       continue;
     }
 
@@ -226,7 +226,7 @@ RemapConfigs::parse_file(const char *filename)
       }
       break;
     default:
-      TSError("%s: file %s, line %d: type not support (unheard of)", PLUGIN_NAME, path.c_str(), line_num);
+      TSError("[%s] file %s, line %d: type not support (unheard of)", PLUGIN_NAME, path.c_str(), line_num);
       continue;
       break;
     }
@@ -265,7 +265,7 @@ TSReturnCode
 TSRemapNewInstance(int argc, char *argv[], void **ih, char * /* errbuf ATS_UNUSED */, int /* errbuf_size ATS_UNUSED */)
 {
   if (argc < 3) {
-    TSError("Unable to create remap instance, need configuration file");
+    TSError("[%s] Unable to create remap instance, need configuration file", PLUGIN_NAME);
     return TS_ERROR;
   }
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/plugins/experimental/ats_pagespeed/ats_base_fetch.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/ats_pagespeed/ats_base_fetch.cc b/plugins/experimental/ats_pagespeed/ats_base_fetch.cc
index b6463b8..eae2dca 100644
--- a/plugins/experimental/ats_pagespeed/ats_base_fetch.cc
+++ b/plugins/experimental/ats_pagespeed/ats_base_fetch.cc
@@ -179,7 +179,7 @@ AtsBaseFetch::HandleDone(bool success)
     TSMBuffer reqp;
     TSMLoc req_hdr_loc;
     if (TSHttpTxnClientReqGet(ctx->txn, &reqp, &req_hdr_loc) != TS_SUCCESS) {
-      TSError("Error TSHttpTxnClientReqGet for resource!");
+      TSError("[ats_base_fetch] Error TSHttpTxnClientReqGet for resource!");
       ctx_ = NULL;
       DecrefAndDeleteIfUnreferenced();
       TSHttpTxnReenable(txn, TS_EVENT_HTTP_CONTINUE);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/plugins/experimental/ats_pagespeed/ats_beacon_intercept.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/ats_pagespeed/ats_beacon_intercept.cc b/plugins/experimental/ats_pagespeed/ats_beacon_intercept.cc
index c1bf3fb..05e2e8e 100644
--- a/plugins/experimental/ats_pagespeed/ats_beacon_intercept.cc
+++ b/plugins/experimental/ats_pagespeed/ats_beacon_intercept.cc
@@ -100,7 +100,7 @@ bool
 InterceptCtx::init(TSVConn vconn)
 {
   if (initialized) {
-    TSError("[%s] InterceptCtx already initialized!", __FUNCTION__);
+    TSError("[ats_beacon_intercept][%s] InterceptCtx already initialized!", __FUNCTION__);
     return false;
   }
 
@@ -145,7 +145,7 @@ handleRead(InterceptCtx *cont_data, bool &read_complete)
 {
   int avail = TSIOBufferReaderAvail(cont_data->input.reader);
   if (avail == TS_ERROR) {
-    TSError("[%s] Error while getting number of bytes available", __FUNCTION__);
+    TSError("[ats_beacon_intercept][%s] Error while getting number of bytes available", __FUNCTION__);
     return false;
   }
 
@@ -185,7 +185,7 @@ handleRead(InterceptCtx *cont_data, bool &read_complete)
           }
           TSDebug(DEBUG_TAG, "[%s] Got content length as %d", __FUNCTION__, cont_data->req_content_len);
           if (cont_data->req_content_len < 0) {
-            TSError("[%s] Invalid content length [%d]", __FUNCTION__, cont_data->req_content_len);
+            TSError("[ats_beacon_intercept][%s] Invalid content length [%d]", __FUNCTION__, cont_data->req_content_len);
             return false;
           }
           if (endptr - data) {
@@ -234,7 +234,7 @@ processRequest(InterceptCtx *cont_data)
   string reply_header("HTTP/1.1 204 No Content\r\n");
   int body_size = static_cast<int>(cont_data->body.size());
   if (cont_data->req_content_len != body_size) {
-    TSError("[%s] Read only %d bytes of body; expecting %d bytes", __FUNCTION__, body_size, cont_data->req_content_len);
+    TSError("[ats_beacon_intercept][%s] Read only %d bytes of body; expecting %d bytes", __FUNCTION__, body_size, cont_data->req_content_len);
   }
 
   char buf[64];
@@ -257,14 +257,14 @@ processRequest(InterceptCtx *cont_data)
 
   if (!server_context->HandleBeacon(beacon_data, cont_data->request_context->user_agent->c_str(),
                                     net_instaweb::RequestContextPtr(system_request_context))) {
-    TSError("Beacon handling failure!");
+    TSError("[ats_beacon_intercept] Beacon handling failure!");
   } else {
     TSDebug(DEBUG_TAG, "Beacon post data processed OK: [%s]", beacon_data.c_str());
   }
 
   cont_data->setupWrite();
   if (TSIOBufferWrite(cont_data->output.buffer, reply_header.data(), reply_header.size()) == TS_ERROR) {
-    TSError("[%s] Error while writing reply header", __FUNCTION__);
+    TSError("[ats_beacon_intercept][%s] Error while writing reply header", __FUNCTION__);
     return false;
   }
   /*
@@ -293,14 +293,14 @@ txn_intercept(TSCont contp, TSEvent event, void *edata)
     TSDebug(DEBUG_TAG, "[%s] Received net accept event", __FUNCTION__);
     TSAssert(cont_data->initialized == false);
     if (!cont_data->init(static_cast<TSVConn>(edata))) {
-      TSError("[%s] Could not initialize continuation data!", __FUNCTION__);
+      TSError("[ats_beacon_intercept][%s] Could not initialize continuation data!", __FUNCTION__);
       return 1;
     }
     break;
   case TS_EVENT_VCONN_READ_READY:
     TSDebug(DEBUG_TAG, "[%s] Received read ready event", __FUNCTION__);
     if (!handleRead(cont_data, read_complete)) {
-      TSError("[%s] Error while reading from input vio", __FUNCTION__);
+      TSError("[ats_beacon_intercept][%s] Error while reading from input vio", __FUNCTION__);
       // return 0;
       read_complete = true;
     }
@@ -321,7 +321,7 @@ txn_intercept(TSCont contp, TSEvent event, void *edata)
   case TS_EVENT_ERROR:
     // todo: do some error handling here
     TSDebug(DEBUG_TAG, "[%s] Received error event; going to shutdown, event: %d", __FUNCTION__, event);
-    TSError("[%s] Received error event; going to shutdown, event: %d", __FUNCTION__, event);
+    TSError("[ats_beacon_intercept][%s] Received error event; going to shutdown, event: %d", __FUNCTION__, event);
     shutdown = true;
     break;
   default:
@@ -330,7 +330,7 @@ txn_intercept(TSCont contp, TSEvent event, void *edata)
 
   if (read_complete) {
     if (!processRequest(cont_data)) {
-      TSError("[%s] Failed to process process", __FUNCTION__);
+      TSError("[ats_beacon_intercept][%s] Failed to process process", __FUNCTION__);
     } else {
       TSDebug(DEBUG_TAG, "[%s] Processed request successfully", __FUNCTION__);
     }
@@ -353,7 +353,7 @@ hook_beacon_intercept(TSHttpTxn txnp)
 {
   TSCont contp = TSContCreate(txn_intercept, TSMutexCreate());
   if (!contp) {
-    TSError("[%s] Could not create intercept request", __FUNCTION__);
+    TSError("[ats_beacon_intercept][%s] Could not create intercept request", __FUNCTION__);
     return false;
   }
   InterceptCtx *cont_data = new InterceptCtx(contp);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/plugins/experimental/ats_pagespeed/ats_config.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/ats_pagespeed/ats_config.cc b/plugins/experimental/ats_pagespeed/ats_config.cc
index cfd88f0..250b455 100644
--- a/plugins/experimental/ats_pagespeed/ats_config.cc
+++ b/plugins/experimental/ats_pagespeed/ats_config.cc
@@ -1,3 +1,4 @@
+
 /** @file
 
     A brief file description
@@ -153,7 +154,7 @@ AtsConfig::Parse(const char *path)
   AtsHostConfig *current_host_configuration = host_configurations_[0];
 
   if (pathstring.empty()) {
-    TSError("Empty path passed in AtsConfig::Parse");
+    TSError("[ats_config] Empty path passed in AtsConfig::Parse");
     return false;
   }
 
@@ -165,7 +166,7 @@ AtsConfig::Parse(const char *path)
   f.open(path, std::ios::in);
 
   if (!f.is_open()) {
-    TSError("could not open file [%s], skip", path);
+    TSError("[ats_config] Could not open file [%s], skip", path);
     return false;
   }
 

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/plugins/experimental/ats_pagespeed/ats_header_utils.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/ats_pagespeed/ats_header_utils.cc b/plugins/experimental/ats_pagespeed/ats_header_utils.cc
index 0b43a8a..d022809 100644
--- a/plugins/experimental/ats_pagespeed/ats_header_utils.cc
+++ b/plugins/experimental/ats_pagespeed/ats_header_utils.cc
@@ -90,7 +90,7 @@ set_header(TSMBuffer bufp, TSMLoc hdr_loc, const char *header_name, const char *
       TSMimeHdrFieldAppend(bufp, hdr_loc, field_loc);
       TSMimeHdrFieldValueStringSet(bufp, hdr_loc, field_loc, -1, header_value, -1);
     } else {
-      TSError("field creation error for field [%s]", header_name);
+      TSError("[ats_header_utils] Field creation error for field [%s]", header_name);
       return;
     }
   }

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/plugins/experimental/ats_pagespeed/ats_pagespeed.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/ats_pagespeed/ats_pagespeed.cc b/plugins/experimental/ats_pagespeed/ats_pagespeed.cc
index 591126e..5ef7587 100644
--- a/plugins/experimental/ats_pagespeed/ats_pagespeed.cc
+++ b/plugins/experimental/ats_pagespeed/ats_pagespeed.cc
@@ -221,7 +221,7 @@ ps_determine_request_options(const RewriteOptions *domain_options, /* may be nul
   if (!server_context->GetQueryOptions(request_context, domain_options, url, request_headers, response_headers, &rewrite_query)) {
     // Failed to parse query params or request headers.  Treat this as if there
     // were no query params given.
-    TSError("ps_route request: parsing headers or query params failed.");
+    TSError("[ats_pagespeed] ps_route request: parsing headers or query params failed.");
     return NULL;
   }
 
@@ -471,11 +471,11 @@ ats_transform_init(TSCont contp, TransformCtx *ctx)
 
   // TODO: check cleanup flow
   if (TSHttpTxnTransformRespGet(ctx->txn, &bufp, &hdr_loc) != TS_SUCCESS) {
-    TSError("Error TSHttpTxnTransformRespGet");
+    TSError("[ats_pagespeed] TSHttpTxnTransformRespGet failed");
     return;
   }
   if (TSHttpTxnClientReqGet(ctx->txn, &reqp, &req_hdr_loc) != TS_SUCCESS) {
-    TSError("Error TSHttpTxnClientReqGet");
+    TSError("[ats_pagespeed] TSHttpTxnClientReqGet failed");
     return;
   }
 
@@ -590,13 +590,13 @@ ats_transform_one(TransformCtx *ctx, TSIOBufferReader upstream_reader, int amoun
   while (amount > 0) {
     downstream_blkp = TSIOBufferReaderStart(upstream_reader);
     if (!downstream_blkp) {
-      TSError("couldn't get from IOBufferBlock");
+      TSError("[ats_pagespeed] Couldn't get from IOBufferBlock");
       return;
     }
 
     upstream_buffer = TSIOBufferBlockReadStart(downstream_blkp, upstream_reader, &upstream_length);
     if (!upstream_buffer) {
-      TSError("couldn't get from TSIOBufferBlockReadStart");
+      TSError("[ats_pagespeed] Couldn't get from TSIOBufferBlockReadStart");
       return;
     }
 
@@ -620,7 +620,7 @@ ats_transform_one(TransformCtx *ctx, TSIOBufferReader upstream_reader, int amoun
       while (ctx->inflater->HasUnconsumedInput()) {
         int num_inflated_bytes = ctx->inflater->InflateBytes(buf, net_instaweb::kStackBufferSize);
         if (num_inflated_bytes < 0) {
-          TSError("Corrupted inflation");
+          TSError("[ats_pagespeed] Corrupted inflation");
         } else if (num_inflated_bytes > 0) {
           if (ctx->recorder != NULL) {
             ctx->recorder->Write(StringPiece(buf, num_inflated_bytes), ats_process_context->message_handler());
@@ -1164,7 +1164,7 @@ RegisterPlugin()
   info.support_email = (char *)"dev@trafficserver.apache.org";
 
   if (TSPluginRegister(&info) != TS_SUCCESS) {
-    TSError("Failed to register ATSSpeed");
+    TSError("[ats_pagespeed] Failed to register");
     return false;
   }
 
@@ -1201,7 +1201,7 @@ process_configuration()
       s.append(ent->d_name);
       fprintf(stderr, "parse [%s]\n", s.c_str());
       if (!new_config->Parse(s.c_str())) {
-        TSError("Error parsing %s", s.c_str());
+        TSError("[ats_pagespeed] Error parsing %s", s.c_str());
       }
     }
     closedir(dir);

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/28b243b0/plugins/experimental/ats_pagespeed/ats_resource_intercept.cc
----------------------------------------------------------------------
diff --git a/plugins/experimental/ats_pagespeed/ats_resource_intercept.cc b/plugins/experimental/ats_pagespeed/ats_resource_intercept.cc
index 15b66e3..22df176 100644
--- a/plugins/experimental/ats_pagespeed/ats_resource_intercept.cc
+++ b/plugins/experimental/ats_pagespeed/ats_resource_intercept.cc
@@ -177,7 +177,7 @@ resource_intercept(TSCont cont, TSEvent event, void *edata)
       if (numBytesWritten == numBytesToWrite) {
         TSVConnWrite(intercept_ctx->vconn, cont, intercept_ctx->resp_reader, numBytesToWrite);
       } else {
-        TSError("Not all output could be written in one go");
+        TSError("[ats_resource_intercept] Not all output could be written in one go");
         DCHECK(false);
       }
     }
@@ -194,18 +194,18 @@ resource_intercept(TSCont cont, TSEvent event, void *edata)
     shutDown = true;
     break;
   case TS_EVENT_ERROR:
-    TSError("vconn event: error %s", intercept_ctx->request_ctx->url_string->c_str());
+    TSError("[ats_resource_intercept] vconn event: error %s", intercept_ctx->request_ctx->url_string->c_str());
     shutDown = true;
     break;
   case TS_EVENT_NET_ACCEPT_FAILED:
-    TSError("vconn event: accept failed");
+    TSError("[ats_resource_intercept] vconn event: accept failed");
     shutDown = true;
     break;
   case TS_EVENT_IMMEDIATE:
   case TS_EVENT_TIMEOUT:
     break;
   default:
-    TSError("default clause event: %d", event);
+    TSError("[ats_resource_intercept] Default clause event: %d", event);
     break;
   }
 
@@ -287,7 +287,7 @@ read_cache_header_callback(TSCont cont, TSEvent event, void *edata)
     TSMBuffer reqp;
     TSMLoc req_hdr_loc;
     if (TSHttpTxnClientReqGet(ctx->txn, &reqp, &req_hdr_loc) != TS_SUCCESS) {
-      TSError("Error TSHttpTxnClientReqGet for resource!");
+      TSError("[ats_resource_intercept] Error TSHttpTxnClientReqGet for resource!");
       TSHttpTxnReenable(txn, TS_EVENT_HTTP_CONTINUE);
       return 0;
     }


Mime
View raw message