自定义日志记录信息

时间:2017-03-01 14:45:27

标签: wixsharp

我是wix#的新手,想知道您是否可以创建自定义日志文件,或者是否可以将消息注入流程。

我发现日志文件不像我想的那么详细。

感谢您的帮助

1 个答案:

答案 0 :(得分:1)

是的,您可以添加到日志中,使用session.Log

dput(head(wits))
structure(list(Start = structure(c(1499525516, 1499516293, 1499516379, 
1499516319, 1499516949, 1499516709), class = c("POSIXct", "POSIXt"
), tzone = "UTC"), End = structure(c(1499525762, 1499518121, 
1499516954, 1499517222, 1499517412, 1499517512), class = c("POSIXct", 
"POSIXt"), tzone = "UTC"), GameCode = c(2991999, 5712506, 1002944, 
8916111, 3495462, 9127270), workerID = c("ACIHCWKHNFC7U", "A3UAO2LYUPO7L6", 
"A8L94A9EF23BV", "A258JTYUD56LOE", "A12SJSJIUR3A23", "A1HHOCO3ZZHCJZ"
), condition = structure(c(1L, 1L, 1L, 1L, 1L, 1L), .Label = c("WITS", 
"WITS No Blurb", "Neutral", "Read"), class = "factor"), about = c(2, 
2, 2, 2, 2, 2), valid = structure(c(1L, 1L, 1L, 1L, 1L, 1L), .Label = 
c("valid responses", 
"invalid responses"), class = "factor"), consv = c(4, 2, 2, 6, 
4, 4), merit1 = c(5, 3, 2, 4, 6, 4), merit2 = c(4, 4, 2, 5, 5, 
4), merit3 = c(3, 4, 2, 5, 4, 5), gender = structure(c(1L, 1L, 
2L, 2L, 2L, 2L), .Label = c("man", "woman", "non-binary", "other"
), class = "factor"), gender_TEXT = c(NA, NA, NA, NA, NA, NA), 
poorid = structure(c(1L, 1L, 1L, 1L, 1L, 1L), .Label = c("not id as poor", 
"id as poor"), class = "factor"), choseskip = structure(c(NA_integer_, 
NA_integer_, NA_integer_, NA_integer_, NA_integer_, NA_integer_
), .Label = c("poor but continued", "poor and skipped"), class = "factor"), 
age = c(28, 30, 33, 41, 26, 30), edu = c(5, 5, 6, 5, 3, 5
), race = structure(c(1L, 1L, 1L, 1L, 1L, 1L), .Label = c("white", 
"black", "latino", "asian", "native american", "other", "multiracial"
), class = "factor"), race_TEXT = c(NA_character_, NA_character_, 
NA_character_, NA_character_, NA_character_, NA_character_
), complete = structure(c(1L, 1L, 1L, 1L, 1L, 1L), .Label = c("Completed 
all", 
"Stopped after demos", "Stopped after consent", "Skipped manip bc poor id"
), class = "factor"), distracted = c(4, 5, 0, 0, 0, 5), happen = c(0, 
0, 0, 0, 0, 0), about__1 = c(2, 2, 2, 2, 2, 2), playread = c(1, 
1, 1, 1, 1, 1), thinking_1 = c(1, 6, 5, 4, 6, 4), thinking_2 = c(4, 
3, 5, 1, 5, 5), thinking_3 = c(1, 4, 7, 4, 5, 5), thinking_4 = c(6, 
4, 7, 1, 5, 3), thinking_5 = c(5, 3, 6, 6, 5, 4), thinking_6 = c(4, 
3, 7, 6, 6, 4), thinking_7 = c(6, 3, 7, 6, 5, 5), text = c(2, 
4, 5, 4, 2, 3), logical_1 = c(1, 3, 4, 4, 4, 4), logical_2 = c(2, 
4, 3, 4, 5, 4), logical_3 = c(4, 3, 5, 4, 5, 4), logical_4 = c(1, 
6, 3, 4, 4, 3), controll_1 = c(6, 6, 1, 4, 4, 4), controll_2 = c(1, 
3, 1, 4, 5, 5), controll_3 = c(1, 4, 3, 6, 4, 5), controll_4 = c(3, 
4, 6, 3, 4, 4), controll_5 = c(6, 3, 6, 1, 4, 4), controll_6 = c(3, 
3, 1, 3, 5, 4), controll_7 = c(2, 5, 1, 5, 4, 5), controll_8 = c(2, 
2, 1, 4, 5, 3), controll_9 = c(6, 2, 6, 3, 5, 5), controll_10 = c(1, 
3, 6, 2, 5, 3), privatesol = c(5, 5.33333333333333, 12, 8, 
8.33333333333333, 8.33333333333333), publicsol = c(7.66666666666667, 
2.66666666666667, 12, 2, 11.3333333333333, 8.33333333333333
), privatesol_2 = c(1, 11, 12, 11, 11, 3), privatesol_3 = c(3, 
2, 12, 2, 3, 11), privatesol_5 = c(11, 3, 12, 11, 11, 11), 
publicsol_2 = c(11, 3, 12, 2, 12, 11), publicsol_3 = c(11, 
2, 12, 2, 11, 3), publicsol_5 = c(1, 3, 12, 2, 11, 11), policy_1 = c(1, 
5, 6, 1, 4, 4), policy_2 = c(3, 2, 6, 1, 5, 4), policy_3 = c(1, 
3, 2, 6, 5, 3), policy_4 = c(6, 3, 5, 6, 5, 4), colaction_5 = c(2, 
5, 6, 1, 2, 5), colaction_6 = c(6, 4, 1, 6, 5, 4), colaction_7 = c(6, 
2, 6, 1, 3, 4), colaction_8 = c(4, 5, 6, 1, 2, 4), colaction_10 = c(4, 
3, 1, 6, 5, 4), colaction_13 = c(3, 2, 6, 1, 2, 3), joke = c(2, 
2, 2, 2, 2, 2), random = c(2, 2, 2, 2, 2, 2), say = c(NA, 
"Nope", NA, "This was  highly  biased survey.", "good survey", 
"NO"), wits = c(1, 1, 1, 1, 1, 1), wits_nb = c(NA_real_, 
NA_real_, NA_real_, NA_real_, NA_real_, NA_real_), neutral = c(NA_real_, 
NA_real_, NA_real_, NA_real_, NA_real_, NA_real_), rural_id = c(0, 
0, 0, 1, 0, 0), relig_id = c(0, 1, 1, 1, 1, 1), prog_id = c(0, 
0, 1, 0, 1, 1), vignette = structure(c(1L, 1L, 1L, 1L, 1L, 
1L), .Label = c("WITS", "WITS No Blurb", "Neutral", "Read"
), class = "factor"), merit3R = c(4, 3, 5, 2, 3, 2), policy_3R = c(6, 
4, 5, 1, 2, 4), policy_4R = c(1, 4, 2, 1, 2, 3), controll_4R = c(4, 
3, 1, 4, 3, 3), controll_5R = c(1, 4, 1, 6, 3, 3), controll_9R = c(1, 
5, 1, 4, 2, 2), controll_10R = c(6, 4, 1, 5, 2, 4), colaction_6R = c(1, 
3, 6, 1, 2, 3), colaction_10R = c(3, 4, 6, 1, 2, 3), logical = c(2, 
4, 3.75, 4, 4.5, 3.75), cognition = structure(c(1, 6, 5, 
4, 6, 4, 4, 3, 5, 1, 5, 5, 1, 4, 7, 4, 5, 5, 6, 4, 7, 1, 
5, 3, 5, 3, 6, 6, 5, 4, 4, 3, 7, 6, 6, 4, 6, 3, 7, 6, 5, 
5), .Dim = 6:7), engage = c(5, 3, 6.66666666666667, 6, 5.33333333333333, 
4.33333333333333), pertake = c(3.66666666666667, 3.66666666666667, 
6.33333333333333, 2, 5, 4.33333333333333), policy = c(2.75, 
3.75, 4.75, 1, 3.25, 3.75), colaction = c(3.16666666666667, 
3.5, 6, 1, 2.16666666666667, 3.66666666666667), controllability = c(2.7, 
3.9, 1.2, 4.5, 3.7, 3.8), completebi = structure(c(1L, 1L, 
1L, 1L, 1L, 1L), .Label = c("Completed all", "Stopped after demos"
), class = "factor"), gender2 = structure(c(1L, 1L, 2L, 2L, 
2L, 2L), .Label = c("man", "woman"), class = "factor")), .Names = c("Start", "End", "GameCode", "workerID", "condition", "about", "valid", 
"consv", "merit1", "merit2", "merit3", "gender", "gender_TEXT", 
"poorid", "choseskip", "age", "edu", "race", "race_TEXT", "complete", 
"distracted", "happen", "about__1", "playread", "thinking_1", 
"thinking_2", "thinking_3", "thinking_4", "thinking_5", "thinking_6", 
"thinking_7", "text", "logical_1", "logical_2", "logical_3", 
"logical_4", "controll_1", "controll_2", "controll_3", "controll_4", 
"controll_5", "controll_6", "controll_7", "controll_8", "controll_9", 
"controll_10", "privatesol", "publicsol", "privatesol_2", "privatesol_3", 
"privatesol_5", "publicsol_2", "publicsol_3", "publicsol_5", 
"policy_1", "policy_2", "policy_3", "policy_4", "colaction_5", 
"colaction_6", "colaction_7", "colaction_8", "colaction_10", 
"colaction_13", "joke", "random", "say", "wits", "wits_nb", "neutral", 
"rural_id", "relig_id", "prog_id", "vignette", "merit3R", "policy_3R", 
"policy_4R", "controll_4R", "controll_5R", "controll_9R", "controll_10R", 
"colaction_6R", "colaction_10R", "logical", "cognition", "engage", 
"pertake", "policy", "colaction", "controllability", "completebi", 
"gender2"), row.names = c(NA, 6L), class = c("tbl_df", "tbl", 
"data.frame"))

Here is a参考