chore: format blog/post log output as <blog>.tumblr.com/post/<id>
Console-friendly URL format for log lines that reference a specific post — easier to copy/paste into a browser when investigating output. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
@@ -1177,7 +1177,7 @@ namespace URLNotesGrabberCORE
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
// Informative output when marking a post as NotFound
|
// Informative output when marking a post as NotFound
|
||||||
Console.WriteLine($"Marking post NotFound: {blogName}/{postID}");
|
Console.WriteLine($"Marking post NotFound: {blogName}.tumblr.com/post/{postID}");
|
||||||
|
|
||||||
connection.Open();
|
connection.Open();
|
||||||
|
|
||||||
@@ -1497,13 +1497,13 @@ namespace URLNotesGrabberCORE
|
|||||||
|
|
||||||
if (rowsAffected == 0)
|
if (rowsAffected == 0)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"[UpdateNoteReplyText] INFO: No rows updated for {rootBlogName}/{postID} from {noteBlogName} at {UnixTimeStampToDateTime(timestamp)} (row not found or value unchanged)");
|
Console.WriteLine($"[UpdateNoteReplyText] INFO: No rows updated for {rootBlogName}.tumblr.com/post/{postID} from {noteBlogName} at {UnixTimeStampToDateTime(timestamp)} (row not found or value unchanged)");
|
||||||
Console.WriteLine($"[UpdateNoteReplyText] Query: {sql}");
|
Console.WriteLine($"[UpdateNoteReplyText] Query: {sql}");
|
||||||
Console.WriteLine($"[UpdateNoteReplyText] Params: rootBlogName={rootBlogName}, PostID={postID}, noteBlogName={noteBlogName}, TimeStamp={timestamp}");
|
Console.WriteLine($"[UpdateNoteReplyText] Params: rootBlogName={rootBlogName}, PostID={postID}, noteBlogName={noteBlogName}, TimeStamp={timestamp}");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Console.WriteLine($"[UpdateNoteReplyText] Successfully updated {rowsAffected} row(s) for {rootBlogName}/{postID} from {noteBlogName}");
|
Console.WriteLine($"[UpdateNoteReplyText] Successfully updated {rowsAffected} row(s) for {rootBlogName}.tumblr.com/post/{postID} from {noteBlogName}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1540,13 +1540,13 @@ namespace URLNotesGrabberCORE
|
|||||||
|
|
||||||
if (rowsAffected == 0)
|
if (rowsAffected == 0)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"[UpdateAllNoteReplyTextForPost] INFO: No rows updated for {rootBlogName}/{postID} (rows not found or values unchanged)");
|
Console.WriteLine($"[UpdateAllNoteReplyTextForPost] INFO: No rows updated for {rootBlogName}.tumblr.com/post/{postID} (rows not found or values unchanged)");
|
||||||
Console.WriteLine($"[UpdateAllNoteReplyTextForPost] Query: {sql}");
|
Console.WriteLine($"[UpdateAllNoteReplyTextForPost] Query: {sql}");
|
||||||
Console.WriteLine($"[UpdateAllNoteReplyTextForPost] Params: rootBlogName={rootBlogName}, PostID={postID}, replyText={replyText}");
|
Console.WriteLine($"[UpdateAllNoteReplyTextForPost] Params: rootBlogName={rootBlogName}, PostID={postID}, replyText={replyText}");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Console.WriteLine($"[UpdateAllNoteReplyTextForPost] Successfully updated {rowsAffected} row(s) for {rootBlogName}/{postID} with '{replyText}'");
|
Console.WriteLine($"[UpdateAllNoteReplyTextForPost] Successfully updated {rowsAffected} row(s) for {rootBlogName}.tumblr.com/post/{postID} with '{replyText}'");
|
||||||
}
|
}
|
||||||
|
|
||||||
return rowsAffected;
|
return rowsAffected;
|
||||||
|
|||||||
@@ -452,7 +452,7 @@ namespace URLNotesGrabberCORE
|
|||||||
const int MaxPages = 10;
|
const int MaxPages = 10;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Console.WriteLine($"[Reply Text] Fetching reply text for {blogName}/{postID}");
|
Console.WriteLine($"[Reply Text] Fetching reply text for {blogName}.tumblr.com/post/{postID}");
|
||||||
|
|
||||||
int replyCount = 0;
|
int replyCount = 0;
|
||||||
int rowsUpdated = 0;
|
int rowsUpdated = 0;
|
||||||
@@ -486,7 +486,7 @@ namespace URLNotesGrabberCORE
|
|||||||
{
|
{
|
||||||
var prevColor = Console.ForegroundColor;
|
var prevColor = Console.ForegroundColor;
|
||||||
Console.ForegroundColor = ConsoleColor.Yellow;
|
Console.ForegroundColor = ConsoleColor.Yellow;
|
||||||
Console.WriteLine($"[Reply Text] No notes returned for {blogName}/{postID} on page {page} (before_timestamp={pageTimestamp})");
|
Console.WriteLine($"[Reply Text] No notes returned for {blogName}.tumblr.com/post/{postID} on page {page} (before_timestamp={pageTimestamp})");
|
||||||
Console.ForegroundColor = prevColor;
|
Console.ForegroundColor = prevColor;
|
||||||
Console.WriteLine($"[Reply Text] meta.status={postsResponse?.meta?.status}, meta.msg=\"{postsResponse?.meta?.msg}\", statusCode={postsResponse?.statusCode ?? "N/A"}");
|
Console.WriteLine($"[Reply Text] meta.status={postsResponse?.meta?.status}, meta.msg=\"{postsResponse?.meta?.msg}\", statusCode={postsResponse?.statusCode ?? "N/A"}");
|
||||||
var raw = postsResponse?.rawJson ?? string.Empty;
|
var raw = postsResponse?.rawJson ?? string.Empty;
|
||||||
@@ -551,17 +551,17 @@ namespace URLNotesGrabberCORE
|
|||||||
{
|
{
|
||||||
var prevColor = Console.ForegroundColor;
|
var prevColor = Console.ForegroundColor;
|
||||||
Console.ForegroundColor = ConsoleColor.Yellow;
|
Console.ForegroundColor = ConsoleColor.Yellow;
|
||||||
Console.WriteLine($"[Reply Text] Marking outstanding replies for {blogName}/{postID} '?' (healthy 200 OK, no matching reply notes after {page} page(s))");
|
Console.WriteLine($"[Reply Text] Marking outstanding replies for {blogName}.tumblr.com/post/{postID} '?' (healthy 200 OK, no matching reply notes after {page} page(s))");
|
||||||
Console.ForegroundColor = prevColor;
|
Console.ForegroundColor = prevColor;
|
||||||
rowsUpdated = DataAccess.UpdateAllNoteReplyTextForPost(blogName, postID, "?");
|
rowsUpdated = DataAccess.UpdateAllNoteReplyTextForPost(blogName, postID, "?");
|
||||||
emptyReplyCount += rowsUpdated;
|
emptyReplyCount += rowsUpdated;
|
||||||
}
|
}
|
||||||
|
|
||||||
Console.WriteLine($"[Reply Text] Done {blogName}/{postID}: notes={replyCount}, rowsUpdated={rowsUpdated}, empty='?'={emptyReplyCount}, pages={page}");
|
Console.WriteLine($"[Reply Text] Done {blogName}.tumblr.com/post/{postID}: notes={replyCount}, rowsUpdated={rowsUpdated}, empty='?'={emptyReplyCount}, pages={page}");
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
Console.WriteLine($"[Reply Text] Error fetching reply text for {blogName}/{postID}: {ex.Message}");
|
Console.WriteLine($"[Reply Text] Error fetching reply text for {blogName}.tumblr.com/post/{postID}: {ex.Message}");
|
||||||
Console.WriteLine($"[Reply Text] StackTrace: {ex.StackTrace}");
|
Console.WriteLine($"[Reply Text] StackTrace: {ex.StackTrace}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user