Two-and-half weeks into Ryan Hogan’s summer season, he didn’t seem to be on the path to being an All-Star starter for the Keene Swamp Bats.

After all, at the time he wasn’t even playing for the Swamp Bats.

The rising redshirt junior at St. John’s University started his summer with the Martha’s Vineyard Sharks — the newest addition to the New England Collegiate Baseball League — and things weren’t panning out as he hoped.

He was only starting one out of every three games at first base for the Sharks, and batting a meager .240/.269/.360. He thought about leaving the team, and had ultimately decided to ride things out, but then an opportunity arose for him to make the switch and join the Bats.

Hogan took this second chance, and took the NECBL by storm. In 19 games with Keene, he’s slashed .317/.379/.517 with three home runs, 15 runs scored and 11 RBI, and earned a selection as the Northern Division’s starting catcher for Sunday’s All-Star Game in Montpelier, Vt.

“I think it’s just kinda funny how I started off on a team where they basically didn’t want me, I’d call it, and then now I’m considered the best catcher in the North,” Hogan said.

The position he was selected for sticks out in particular, as Hogan was not catching for either Martha’s Vineyard or for St. John’s. Despite being listed on the Red Storm’s roster as a catcher and getting some opportunities to play behind the plate in the fall, Hogan started 47 games as the team’s primary first baseman in the spring season, while Wyatt Mascarella — who signed a free agent contract with the Kansas City Royals in June — took the catching duties.

But when Hogan made the move to Keene, the Bats needed someone else behind the plate. Following a season-ending injury to Matt Trehub, the team was left with one starter (Seth Caddell) and one emergency substitution (Ryan Deo) on its roster.

So, Hogan dove headfirst into his catching duties. He has played 104.2 innings behind the plate, recording 125 putouts and seven assists with a .978 fielding percentage. He has also played a role as a backup first baseman for fellow All-Star Logan Mathieu, putting in 42.2 innings at his old position.

“I think he’s improved just from the time he started [playing catcher],” Keene Manager Gary Calhoun said. “I think if you ask [the pitchers], they like him too, because he cares enough to put his body in front of stuff.

“You can’t even put a dollar sign on that; when you’re pitching and you can throw your breaking ball with a man on third, throw it the way you want, and if it’s down he attempts to keep it from going to the fence.”

Hogan’s time with the Bats was an adventure from the start.

The night of June 26, he had a phone conversation with team president Kevin Watterson, who told him to make the trek to Keene the next day and just get settled in, saying he wouldn’t play that day.

Hogan booked an afternoon ferry ride to get from the Vineyard to mainland Massachusetts, which would be followed by a drive to the Elm City, three-and-a-half-hours in all. But once he arrived, he met Calhoun, and the first thing his new manager asked was, “are you ready to play tonight?”

It was a hectic way to make a debut, but Hogan made the most of it.

Keene used three pitchers that night (Luke Albright, Marc Davis and Justin Willis) against the Mystic Schooners, and each time one would take the mound, Hogan would go up, introduce himself, ask what pitches they threw and adapt on the fly.

But after three previous stints in summer ball (with the Lehigh Valley Catz of the Atlantic Collegiate Baseball League in 2016, the Sanford Mainers of the NECBL in 2017, and for the Valley Baseball League’s Strasburg Express and the Cape Cod League’s Brewster Whitecaps in 2018), Hogan was used to getting to know his pitchers quickly and making the adjustments as he went.

“You get used to going up and meeting a guy and saying, ‘Hey, how are you doing? What do you throw?’ ” Hogan said. “It’s kind of like a custom now, where you get used to adapting quick to new guys.”

Keene’s three hurlers combined for a three-run outing that night, allowing six hits and five walks while striking out 11.

But Hogan really ingratiated himself to his new teammates and fans with his first trip to the plate. With two runners on and two outs in the bottom of the second inning, Hogan teed off for a three-run homer to left, accounting for most of the Bats’ runs in a 4-3 win over Mystic.

“Just getting that first at-bat and doing that was an awesome feeling,” Hogan said. “I think it really allowed me to settle in from an early standpoint, and I feel like everyone kind of gelled with me quicker because of that.”

Since that game, Hogan has had a knack for stepping up in close games. This includes scoring the go-ahead run in Keene’s comeback win over the Danbury Westerners in its “Independence Day Game” on July 3; scoring the tying run as a pinch-runner in the Bats’ ninth-inning comeback win over the Sanford Mainers on July 14; and driving in the go-ahead runs with a two-run homer late in a seven-inning game against the Valley Blue Sox Tuesday.

While Hogan said he still doesn’t understand why things didn’t work out in Martha’s Vineyard, he said he has a good relationship with his former coaches and teammates.

“I like all those guys. The coaches, they were texting me after I came here, telling me how awesome I was doing,” Hogan said. “I still don’t understand it, but it is what it is — they had their reasons.”

Hogan said he doesn’t know if his play behind the plate for Keene will translate into more catching duties at St. John’s, and he doesn’t know if the MLB will come calling for him some day. The computer science major — who is also minoring in cyber security and business and getting an early start on his master’s degree in computer science — said he’d be perfectly fine to fall back on his education rather than his athletics.

But he also said he’s more than willing to take whatever opportunities the baseball world gives him.

“That’s kind of what life is, especially in sports,” Hogan said. “When you get your shot, you’ve just got to be ready.”